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
相关推荐
lhh_qrsly6 小时前
HTTP / HTTPS / MQTT / MQTTs(嵌入式学习版)
学习·http·https
裕晟资质规划1 天前
三类资质变更报告时限差在哪?军工 15 日、集成印制 10 日
大数据·服务器·网络
轻舟技术A1 天前
Provider 不属于 Agent 核心:rpi 的分层理由与收益
服务器·网络
Escalating_xu1 天前
【Linux 网络编程】TCP Socket 编程(上):从 listen、accept 到完整回显通信
linux·网络·tcp/ip
NetX行者1 天前
Python 工程化入门:从脚本到规范的 Python 项目结构
网络·python
Yang96111 天前
从相位噪声到实时带宽:HD-063B支撑的频谱实验项目
网络
happyprince1 天前
01-整体观-DeepSeek-V4.1-Flash全貌解读
网络
是真的小外套1 天前
2023年软考中级信息安全工程师|选择题考点+5道案例分析真题解析(含答案)
java·服务器·网络
一条泥憨鱼1 天前
【计算机网络】| 从 MAC 到 NAT 的跨网段通信全链路
服务器·网络·学习·计算机网络·macos