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
相关推荐
pshdhx_albert3 小时前
AI agent实现打字机效果
java·http·ai编程
古译汉书3 小时前
【IoT死磕系列】Day 9:架构一台“自动驾驶物流车”,看8种协议如何协同作战
网络·arm开发·单片机·物联网·tcp/ip·架构·自动驾驶
哼?~5 小时前
Linux--网络基础
网络
苏渡苇6 小时前
Docker 网络完全指南
网络·docker·容器·docker容器·容器通信
风曦Kisaki8 小时前
# Linux 磁盘查看命令详解:df 与 du
linux·运维·网络
攻城狮在此8 小时前
华为交换机Console口密码如何清除
运维·网络·华为
hhcgchpspk9 小时前
网速上传下载流量监测工具尝试
网络·python·cmd·psutil
亚空间仓鼠10 小时前
OpenEuler系统常用服务(四)
linux·运维·服务器·网络
郝学胜-神的一滴10 小时前
Socket实战:从单端聊天到多用户连接的实现秘籍
服务器·开发语言·python·网络协议·pycharm
刘佬GEO10 小时前
【无标题】
网络·人工智能·搜索引擎·ai·语言模型