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
相关推荐
大鹏说大话4 小时前
SSL证书自动化的未来:ACME协议与Let’s Encrypt实践
网络·安全
被摘下的星星5 小时前
网际协议(IP协议)
网络·tcp/ip
爱学习的小囧6 小时前
ESXi VMkernel 端口 MTU 最佳设置详解
运维·服务器·网络·php·虚拟化
TechubNews9 小时前
Base 发布首个独立 OP Stack 框架的网络升级 Azul,将是 L2 自主迭代的开端?
大数据·网络·人工智能·区块链·能源
多年小白10 小时前
中科院 Ouroboros 晶圆级存算一体芯片深度解析
大数据·网络·人工智能·科技·ai
发光小北10 小时前
IEC104 转 Modbus TCP 网关如何应用?
网络·网络协议·tcp/ip
~ rainbow~11 小时前
前端转型全栈(六)——深入浅出:文件上传的原理与进阶
前端·http·文件上传
山栀shanzhi11 小时前
在做直播时,I帧的间隔(GOP)一般是多少?
网络·c++·面试·ffmpeg
SPC的存折11 小时前
Cisco Packet Tracer 静态路由全网互通实验及详细教学文档,包括基础常识、实验信息、IP 地址规划和分步操作流程
网络·tcp/ip·智能路由器
东北甜妹11 小时前
网络服务-
网络·智能路由器