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
相关推荐
航Hang*3 小时前
第十五章:网络系统建设与运维(高级)—— 总复习
网络·华为·ensp·期末·复习
塔能物联运维4 小时前
Zigbee自适应信道选择提升网络稳定性
网络
chenyuhao20244 小时前
Linux网络编程:数据链路层
linux·运维·网络
北邮刘老师4 小时前
【智能体互联协议解析】AIP/ACPs如何实现“自主互联,协商互通,独立自治”
网络·人工智能·大模型·智能体·智能体互联网
西敏寺的乐章5 小时前
ThreadLocal / InheritableThreadLocal / TransmittableThreadLocal(TTL)学习总结
java·开发语言·网络
阿拉伯柠檬5 小时前
传输层协议TCP(二)
linux·服务器·网络·网络协议·tcp/ip·面试
源远流长jerry6 小时前
http协议和https协议的连接流程
网络·http·https
松涛和鸣6 小时前
44、HTML与HTTP服务器交互笔记
linux·运维·服务器·http·链表·html
居然是阿宋6 小时前
DHCP深度解析:从自动连接到七层之谜
网络
源远流长jerry7 小时前
WebSocket 消息传输:帧格式、掩码机制与代理污染攻击防护
网络·websocket·网络协议