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
相关推荐
郝学胜-神的一滴3 小时前
Effective Python 条款45:巧用属性注解平滑升级类属性
运维·开发语言·数据库·python·网络协议·numpy
SEO_juper3 小时前
HTTPS 混合内容检查工具:页面全站 https 了,但还有 http 资源在拖后腿
开发语言·网络协议·http·https·node.js·json·bash
LabVIEW开发4 小时前
EXFO IQS-5100B + LabVIEW 光测试怎么做?
服务器·网络·labview
一木 之林4 小时前
SDL双义辨析-CSDN成稿
网络·ffmpeg·sdl
进击的荆棘4 小时前
Linux网络——应用层协议HTTP
linux·运维·服务器·网络·http
南京码讯光电技术有限公司4 小时前
边缘数据采集工业网关深度横评:协议兼容、边缘计算、可靠性、易用性四维度怎么选(2026年)
网络·人工智能·边缘计算·工业通信·工业wifi
雪球数智5 小时前
IoT 行业情报周报|市场动态、技术趋势与产业洞察(第八期)
网络·物联网·安全·智能家居·iot
jipinxiaofeihua6 小时前
(文章7) 04章-C++异常处理(下)
linux·运维·网络
LabVIEW开发17 小时前
ALMEMO 采集器 + LabVIEW 多路温度怎么采?
网络·labview
郝学胜-神的一滴1 天前
Effective STL 条款 14:用扩容函数避免重新分配
linux·开发语言·网络·数据结构·c++·单片机