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
相关推荐
xhbh66613 分钟前
端口转发是什么?如何设置端口转发?
网络·流量转发·端口流量转发
S1998_1997111609•X23 分钟前
论恶意注入污染蜜罐进程函数值取仺⺋以集团犯罪获取数据爬虫的轮系依据
网络·数据库·爬虫·网络协议·百度
S1998_1997111609•X2 小时前
恶意注入污染蜜罐HDMI进程函数值进行封禁垃圾蠕虫仓蟲的轮系依据行为戆直㞢仓shell token
数据库·爬虫·网络协议·百度·开闭原则
头条娱圈2 小时前
Ella 陈嘉桦「艾拉主意」苏州站圆满落幕 十站二十场铸就巡演里程碑
网络
小墨同学boy2 小时前
别再折腾 FRP 了!无公网 IP、不碰路由器,Tailscale 三步搞定异地组网
网络·网络协议·tcp/ip
想成为优秀工程师的爸爸2 小时前
车载以太网之要火系列 - 第33篇:郭大侠学UDS(10服务)- 桃花岛内规矩多,模式切换要会说
网络·笔记·网络协议·信息与通信·车载以太网
ACP广源盛139246256732 小时前
一芯搞定多屏高清@ACP#GSV1221 DP 1.4 MST 转 HDMI 1.4 高集成转换芯片
网络·人工智能·嵌入式硬件·计算机外设·电脑
Empty-Filled2 小时前
AI Agent 测试入门:从回答问题到执行任务
网络·人工智能
Yupureki3 小时前
《Linux网络编程》4.应用层HTTP协议
linux·服务器·c语言·网络·c++·http
m0_738120723 小时前
网路安全编程——熟悉并使用Scapy简单实现捕捉主流邮箱协议(SMTP、POP3和IMAP) 的身份凭证
网络·python·网络协议·tcp/ip·安全·网络安全