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
相关推荐
ch3nyuyu6 小时前
Ubuntu(乌班图)基础指令
linux·运维·网络
其实防守也摸鱼7 小时前
软件安全与漏洞--6、软件安全需求分析
网络·安全·网络安全·软件需求·等保·法律
firstacui7 小时前
MGRE实验
运维·服务器·网络
大卡片8 小时前
IO模型与并发服务器设计
运维·服务器·网络
IpdataCloud9 小时前
IPv6商用数据的IP离线库能解决哪些业务问题?适用场景与接入指南
网络·网络协议·tcp/ip
S1998_1997111609•X10 小时前
MacOS/ˉsh(so.))os.apkair/AI
开发语言·网络·人工智能
古城小栈12 小时前
hey 你好 “压测”
http·golang·开源
VOOHU-沃虎12 小时前
强抗振、高可靠:RJ45卡侬自锁连接器在工业恶劣环境中的选型指南
网络·工业控制
hhb_61812 小时前
Go高性能并发编程实战与底层原理剖析
运维·网络·golang
道清茗13 小时前
【RH294知识点汇总】第 6 章 《 管理复杂的 Play 和 Playbook 》常见问题
linux·服务器·网络