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
相关推荐
安科瑞刘鸿鹏171 小时前
从监测到保护:ALP如何赋能企业配电柜安全升级?
运维·网络·安全
IUGEI1 小时前
深入解析HTTP长连接原理
java·网络·后端·网络协议·tcp/ip·http·https
kkce2 小时前
快快科技 MTR 路由检测全面支持 IPv6,多节点覆盖赋能全协议网络诊断
服务器·网络·科技
acrel158215962212 小时前
新品!分布式新能源群调群控装置!ANet-4E16S-AGVC 装置让分布式发电更智能、更高效
网络·安科瑞电气·分布式新能源群调群控装置·微电网能源管理
zbtlink2 小时前
企业级路由器双网接入指南:实现高效稳定的网络融合
网络
ifeng09183 小时前
HarmonyOS网络请求优化实战:智能缓存、批量处理与竞态处理
网络·缓存·harmonyos
llilian_163 小时前
智能数字式毫秒计在实际生活场景中的应用 数字式毫秒计 智能毫秒计
大数据·网络·人工智能
武汉唯众智创4 小时前
职业院校网络安全靶场实训演练系统建设方案
网络·安全·web安全·网络安全·网络安全靶场实训演练系统·网络安全靶场实训·网络安全实训演练系统
G31135422734 小时前
判断 IP 地址纯净度
服务器·网络
阿珊和她的猫4 小时前
HTTP:Web 世界的基石协议详解
前端·网络协议·http