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
相关推荐
m***D2862 小时前
云原生网络
网络·云原生
u***27612 小时前
C#数据库操作系列---SqlSugar完结篇
网络·数据库·c#
阿珊和她的猫4 小时前
HTTP 状态码 304:未修改(Not Modified)的深度解析
网络协议·http·状态模式
jinxinyuuuus6 小时前
局域网文件传输:P2P架构中NAT穿透、打洞与数据安全协议
网络协议·架构·p2p
chuxinweihui7 小时前
应用层协议 HTTP
linux·服务器·网络·网络协议·http
chuxinweihui7 小时前
HTTP cookie 与 session
网络·网络协议·http
RocketJ7 小时前
TCP、Telepathy 和 HTTP 三者关系
网络协议·tcp/ip·http
默恋~微凉7 小时前
Shell(九)——HTTP与HTTPS协议
网络协议·http·https
fei_sun7 小时前
【复习】计网每日一题1121大题--HTTP/1.0、HTTP/1.1、持续连接、非持续连接、并行连接、Web、JPEG图像
网络·网络协议·http
Yan-英杰7 小时前
解决方案: CondaHTTPError: HTTP 000 CONNECTION FAILED for url
网络·网络协议·http