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
相关推荐
跨境数据猎手13 分钟前
HTTP 响应体编码与压缩:识别、解码
网络协议·http·ios
安易算力24 分钟前
智算中心网络架构:RDMA/IB/以太网选型深度解析与优化实践
网络·架构·php
B1118521Y461 小时前
网络安全案例1:远程登陆实战
网络
|_⊙2 小时前
传输层协议UDP和TCP
网络·tcp/ip·udp
凯基迪科技2 小时前
瑞萨R5F100解密 R8C/RL78 MCU 固件读取与保护机制详解
服务器·网络·单片机
承渊政道2 小时前
Linux网络学习【五种IO模型与⾮阻塞IO】
linux·网络·学习·ubuntu·io模型·非阻塞io
未力忘3 小时前
S7-200 SMART Modbus TCP 通信实践
网络·网络协议·tcp/ip
Likeadust3 小时前
说开就开:临时发起的私有化音视频实时通信EasyDSS视频会议,让跨城协作不再“等排期”
网络·音视频·easydss
我爱学习_zwj3 小时前
IP 地址与子网划分
网络协议·网络安全