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
相关推荐
三体世界43 分钟前
TCP传输控制层协议深入理解
linux·服务器·开发语言·网络·c++·网络协议·tcp/ip
LuDvei1 小时前
CH9121T电路及配置详解
服务器·嵌入式硬件·物联网·网络协议·tcp/ip·网络安全·信号处理
泷羽Sec-静安1 小时前
OSCP官方靶场-Solstice WP
服务器·网络·数据库
华不完1 小时前
下一代防火墙混合模式部署
运维·服务器·网络
longze_72 小时前
frp内网穿透下创建FTP(解决FTP“服务器回应不可路由的地址。使用服务器地址替代”错误)
运维·服务器·网络
cui_win2 小时前
【网络】Linux 内核优化实战 - net.ipv4.tcp_keepalive_time
linux·网络·tcp/ip
令狐掌门2 小时前
tcp长连接与短连接
网络·网络协议·tcp/ip
创小匠2 小时前
创客匠人洞察:AI 时代创始人 IP 打造如何突破效率与价值的平衡
人工智能·网络协议·tcp/ip
__只是为了好玩__3 小时前
Apache http 强制 https
http·https·apache·ssl
zhysunny4 小时前
WebSocket实战:实现实时聊天应用 - 双向通信技术详解
网络·websocket·网络协议