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
相关推荐
星融元asterfusion4 小时前
uCentral Controller:数据中心网络的智能化控制核心
网络·开源软件·ucentral
青青草原技术员灰太狼5 小时前
Nginx的https搭建
linux·服务器·网络
xu_yule5 小时前
网络和Linux网络-4(应用层)序列化和反序列化(网络计算器)
linux·网络
柳鲲鹏5 小时前
寻北仪的种类及其原理
网络
寂寞旅行6 小时前
解决摄像头/麦克风 在HTTP环境下的调用问题
网络·网络协议·http
爱学习的程序媛6 小时前
《图解HTTP》核心知识点梳理
网络·网络协议·http·https
oioihoii6 小时前
C++网络编程:从Socket混乱到优雅Reactor的蜕变之路
开发语言·网络·c++
拾忆,想起7 小时前
Dubbo服务调用流程全解析:从请求到响应的微服务通信之旅
服务器·网络·微服务·云原生·架构·dubbo
老蒋新思维7 小时前
创客匠人 2025 全球创始人 IP+AI 万人高峰论坛:AI 赋能下知识变现与 IP 变现的实践沉淀与行业启示
大数据·人工智能·网络协议·tcp/ip·重构·创始人ip·创客匠人
游戏开发爱好者88 小时前
Charles 抓不到包怎么办?从 HTTPS 代理排错到底层数据流补抓的完整解决方案
网络协议·http·ios·小程序·https·uni-app·iphone