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
相关推荐
江畔何人初20 小时前
iptables 和 IPVS 代理模式 Service 的区别
linux·运维·服务器·网络·云原生·kubernetes·代理模式
123过去1 天前
nfc-list使用教程
linux·网络·测试工具·安全
攻城狮在此1 天前
华三交换机链路聚合配置(三层聚合)
网络·华为
evo-master1 天前
网络故障排除方法
linux·服务器·网络
Johnstons1 天前
网络流量监控工具怎么选
运维·网络·网络故障排除·网络流量分析·网络性能监控
jiankeljx1 天前
Java实战:Spring Boot application.yml配置文件详解
java·网络·spring boot
三三有猫1 天前
代理IP:按流量还是按IP/时长计费更划算?
网络·网络协议·tcp/ip
A.A呐1 天前
【Linux第十九章】网络基础
linux·网络
程序猿追1 天前
HarmonyOS 6.0 网络请求深度解析:从基础调用到生产级封装
网络·华为·harmonyos
桌面运维家1 天前
BGP路由优化实战:加速收敛,提升网络稳定性
网络·windows·php