HTTP 308 错误永久重定向 (Permanent Redirect)

HTTP 308 错误永久重定向 (Permanent Redirect)

测试环境访问另一个系统时报错
使用curl 测试

复制代码
curl --location --request POST 'http://xxxxx.cn/login' \ 

--header 'Content-Type: application/json' \
--data-raw '{
  "username": "admin",
  "password": "123456" 
}'
curl: (60) SSL certificate problem: self-signed certificate
More details here: https://curl.se/docs/sslcerts.html

curl failed to verify the legitimacy of the server and therefore could not
establish a secure connection to it. To learn more about this situation and
how to fix it, please visit the web page mentioned above.

结果说是证书问题 因为请求里面用的是http 测试环境没有配置

然后使用-k还会出现别的错误就不再演示

正确配置

让 xxxx.cn 这个域名指向 192.168.1.156 这个 IP 地址

复制代码
vim /etc/hosts

192.168.1.156   xxxx.cn
相关推荐
Soari9 分钟前
交换机转发模式
开发语言·网络·php
qq_4017004110 分钟前
QNetworkConfigurationManager 与网络状态监控:Qt 上位机如何判断网络真的可用
网络·智能路由器
隐擎fox30 分钟前
深入 QUIC 与 HTTP/3 协议栈特征:新一代 UDP 流量风控识别与网络防关联工程实战
网络·http·udp
网络小江38 分钟前
上网第五十六课:第八周复盘——实战与安全快问快答
网络协议
碧海银沙音频科技研究院40 分钟前
基于炬芯ATS3089X U 盘 MP3 播放器实现
网络
FW-Linker1 小时前
多链路聚合如何降低直播音画不同步概率?从网络抖动到数据包级拆分
网络·5g·智能路由器
逐梦之程1 小时前
EXCEL与DBC格式互转软件
运维·服务器·网络
重生之高冷汉堡包1 小时前
什么是数据中心代理?原理拆解、类型区别、应用场景与选型指南
服务器·网络·数据库·安全·ip
青衫客361 小时前
从网卡到 Socket:再探 Linux 网络协议栈与 iptables 数据包处理流程
linux·网络·网络协议