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
相关推荐
Muisti11 分钟前
NAT技术(网络地址转换)
网络·计算机网络·智能路由器
SKYDROID云卓小助手28 分钟前
无人设备遥控器之无线电频率篇
服务器·网络·单片机·嵌入式硬件·算法
chirrupy_hamal38 分钟前
TCP 保活(KeepAlive)机制详解
网络·tcp
hrrrrb1 小时前
【TCP/IP】7. IP 路由
网络·tcp/ip·智能路由器
189228048611 小时前
NW710NW713美光固态闪存NW719NW720
大数据·服务器·网络·人工智能·科技
会会会一飞冲天的小慧猪~ ~ ~1 小时前
网络综合实验
服务器·网络·lvs
刘坤151 小时前
封装axios二方包
前端·http
嵌入式郑工1 小时前
RV1126平台(Buildroot Linux)+ SunplusIT SPCA2688 USB摄像头 RTSP推流全流程复盘与问题解决记录
网络
abc23735817632 小时前
静态路由综合实验
网络
三体世界2 小时前
TCP传输控制层协议深入理解
linux·服务器·开发语言·网络·c++·网络协议·tcp/ip