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
相关推荐
国科安芯19 分钟前
ASP4644芯片低功耗设计思路解析
网络·单片机·嵌入式硬件·安全
IT_Octopus24 分钟前
https私人证书 PKIX path building failed 报错解决
java·spring boot·网络协议·https
艾菜籽28 分钟前
网络原理-HTTPS
网络·网络协议·https
努力学习的小廉1 小时前
深入了解linux网络—— TCP网络通信(下)
linux·网络·tcp/ip
摇滚侠1 小时前
什么是 mesh 组网
网络协议
Arva .2 小时前
HTTP Client
网络协议·http·lua
Bruce_Liuxiaowei3 小时前
MQTT协议在物联网环境中的安全风险与防范指南
运维·网络·物联网·安全·网络安全
Paul_09203 小时前
golang面经——内存相关模块
服务器·网络·golang
yenggd3 小时前
vxlan-bgp-evnp分布式网关配置案例
网络·分布式·华为
CiLerLinux8 小时前
第四十九章 ESP32S3 WiFi 路由实验
网络·人工智能·单片机·嵌入式硬件