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
相关推荐
2603_954708316 小时前
如何确保微电网标准化架构设计流程的完整性?
网络·人工智能·物联网·架构·系统架构
code_li9 小时前
HTTPS免费证书配置指南
网络协议·http·https
花无缺就是我10 小时前
2026年最新内网穿透有哪些方案,详细列举
网络·电信专线
以太浮标10 小时前
华为eNSP模拟器综合实验之- 主机没有配置缺省网关时,通过路由式Proxy ARP实现通信(arp-proxy enable)
运维·网络·网络协议·华为·智能路由器·信息与通信
时空自由民.11 小时前
蓝牙协议栈知识和网络协议栈知识对比
网络·arm开发·网络协议
被摘下的星星11 小时前
四层模型TCP/IP协议栈
运维·服务器·网络
醉颜凉11 小时前
网络协议基础必学:ARP 和 RARP 是什么?有什么区别?原理+流程图+对比详解
网络·网络协议·流程图
杜子不疼.11 小时前
无需公网 IP!Grafana+内网穿透轻松实现数据看板远程访问
网络协议·tcp/ip·grafana
tie123411 小时前
HTTP相关
网络·网络协议·http