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
相关推荐
北冥有鱼被烹10 分钟前
NVIDIA DGX/HGX 服务器全景深度解析:从 H100 到 GB300,专业算力选型必读
运维·服务器·网络·python
孤岛悬城12 分钟前
监控和日志的网络协议
网络·网络协议
为啥全要学17 分钟前
PyTorch 中网络剪枝、梯度剪裁、梯度累积
网络·pytorch·剪枝
lupai24 分钟前
SSL 证书落地应用与网站安全加固指南
网络协议·安全·ssl
wiliam_luky32 分钟前
RTMP和RTSP+RTP+RTCP
网络
zxanz11 小时前
SSL 证书有哪些类型,怎么选择适合自己使用的?
网络·网络协议·ssl
通信数码研究院1 小时前
2026户外监控选什么?TOP5场景适配榜单:五类安装环境与产品选型参考
网络
谢亮_vipxieliang1 小时前
容器日志收集与管理:从 stdout 规范到 ELK/Loki 落地
运维·网络·人工智能·elk·docker·容器
QYRdata1 小时前
年复合增长率19.6% 数据隐私安全软件赛道领跑新兴科技
网络·科技·服务发现
半仙白桑2 小时前
内核篇第十三讲:system-V消息队列
java·linux·网络