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
相关推荐
yuanmenghao4 小时前
车载Linux 系统问题定位方法论与实战系列 - 车载 Linux 平台问题定位规范
linux·运维·服务器·网络·c++
上海云盾安全满满7 小时前
高防IP线路质量重要吗
网络·网络协议·tcp/ip
hoududubaba8 小时前
ORAN共享小区的基本概念
网络·网络协议
山峰哥8 小时前
数据库工程核心:SQL调优让查询效率飙升的实战密码
网络·汇编·数据库·sql·编辑器
梁辰兴11 小时前
计算机网络基础:网络地址转换
网络·计算机网络·计算机·nat·计算机网络基础·梁辰兴·网络地址转换协议
Q168496451511 小时前
红帽Linux-进程、ssh、网络、软件包、文件系统
linux·运维·网络
tobias.b11 小时前
408真题解析-2009-39-网络-TCP拥塞控制
网络·网络协议·tcp/ip·计算机考研·408考研·408真题解析
数通工程师12 小时前
IPv4和IPv6 地址分配:从划分到工具全解析
网络·网络协议·tcp/ip·华为
小白电脑技术12 小时前
玩客云OneCloud插入内存卡之后,开机自动挂载教程
网络·电脑
南烟斋..12 小时前
嵌入式系统(51单片机)核心外设详解:UART通信与DS18B20温度采集
linux·运维·网络