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
相关推荐
冬奇Lab1 天前
一天一个开源项目(第46篇):Caddy - 自动 HTTPS 的现代化 Web 服务器,支持 HTTP/3
网络协议·nginx·开源
牛奶2 天前
从一行字到改变世界:HTTP这三十年都经历了什么?
前端·http·http3
牛奶2 天前
浏览器到底在偷偷帮你做什么?——HTTP缓存与刷新机制
前端·http·浏览器
韭菜炒大葱4 天前
前端经典面试题:从 URL 输入到页面展示,中间经历了什么?
前端·http·面试
Sheffield4 天前
Docker的跨主机服务与其对应的优缺点
linux·网络协议·docker
YuMiao9 天前
gstatic连接问题导致Google Gemini / Studio页面乱码或图标缺失问题
服务器·网络协议
不可能的是10 天前
前端 SSE 流式请求三种实现方案全解析
前端·http
Jony_12 天前
高可用移动网络连接
网络协议
chilix12 天前
Linux 跨网段路由转发配置
网络协议
DianSan_ERP13 天前
电商API接口全链路监控:构建坚不可摧的线上运维防线
大数据·运维·网络·人工智能·git·servlet