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
相关推荐
FreeBuf_6 小时前
黄金旋律IAB组织利用暴露的ASP.NET机器密钥实施未授权访问
网络·后端·asp.net
Tanecious.8 小时前
C++--红黑树封装实现set和map
网络·c++
帽儿山的枪手8 小时前
追踪网络流量就这么简单 | 进阶篇 | conntrack
linux·windows·网络协议
yqcoder9 小时前
7. TCP 和 UDP 的区别
网络·网络协议·http
wanhengidc9 小时前
UDP服务器的优缺点都包含哪些?
服务器·网络协议·udp
weixin_456732599 小时前
tcpdump交叉编译
网络·测试工具·tcpdump
小猫会后空翻10 小时前
HTTPS与DNS
网络协议·http·https
IT WorryFree11 小时前
macos安装iper3
网络·macos·iperf·打流
hrrrrb11 小时前
【TCP/IP】14. 远程登录协议
网络·网络协议·tcp/ip
别枫了11 小时前
TCP的连接
服务器·网络·tcp/ip