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
相关推荐
Oll Correct6 小时前
实验二十一:验证OSPF可以划分区域
网络·笔记
半个西瓜.8 小时前
车联网安全:GPS定位测试.(静态欺骗)
网络·安全·网络安全·车载系统·安全威胁分析
pengyi8710158 小时前
独享IP+动态IP结合核心逻辑,破解稳定与灵活的矛盾
linux·运维·网络
梅羽落13 小时前
MSF基础1
网络·网络协议·tcp/ip
被摘下的星星14 小时前
子网de划分
网络·算法
xiaoshuaishuai814 小时前
C# modbustcp的ack包通信延迟原因
网络·tcp/ip·c#
byoass14 小时前
自动化任务系列之五:PDF批量转换+自动清理——文件格式规范化工作流
网络·人工智能·安全·云计算
LlNingyu15 小时前
简单流量分析,串通Wireshark基本使用
网络·wireshark·流量分析
茉莉玫瑰花茶15 小时前
HTTPS 协议原理
网络协议·https·iphone
byoass15 小时前
自动化任务系列之六:自动整理文件——按时间/关键字分类归档实战
运维·网络·安全·自动化·云计算