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
相关推荐
南湖北漠22 分钟前
记录生活中的一件小事(佚名整理)
网络·人工智能·计算机网络·其他·安全·生活
多年小白33 分钟前
OpenAI 发布 DALL-E 4:4K分辨率+视频生成,AI图像创作进入新阶段
网络·人工智能·科技·深度学习·计算机视觉
攻城狮在此40 分钟前
华三框式交换机IRF堆叠配置四(LACP MAD检测)
网络·架构
qZ6bgMe431 小时前
使用Mixin类简单重构配置模块
网络·python·重构
攻城狮在此1 小时前
华三交换机如何从IRF模式恢复到独立运行模式配置
网络·架构
Strange_Head1 小时前
《Linux系统编程篇》Linux Socket 网络编程03(Linux 进程间通信(IPC))——基础篇
linux·网络·单片机
Strange_Head1 小时前
《Linux系统网络协议》从 TCP 到 HTTP:理解 Web 通信的第一步——网络篇
linux·网络·网络协议
@insist1231 小时前
网络工程师-广域网与接入网技术(一):核心协议与流量控制
开发语言·网络·网络工程师·软考·软件水平考试
爱吃生蚝的于勒1 小时前
【Linux】重中之重!TCP协议
linux·运维·服务器·网络·学习·tcp/ip
楼田莉子1 小时前
Linux网络:TCP协议
linux·运维·服务器·网络·tcp/ip