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
相关推荐
Olivia0514051415 分钟前
Voohu:CHIP LAN在2.5G/5G多速率以太网中的共模抑制带宽要求与选型
网络
缝艺智研社1 小时前
2026年 自动化缝纫模板机 机器人工作站市场洞察与排名
大数据·网络·人工智能·自动化·制造·新人首发·自动化缝纫机
静心观复1 小时前
从短连接到 gRPC:一文读懂 HTTP 连接模型的演进
网络·网络协议·http
哼?~1 小时前
应用层协议TCP
网络·tcp
xhbh6662 小时前
Win系统实现网络转发与端口映射:从 IPEnableRouter 到 RRAS 完整步骤
网络·端口转发·流量端口转发·ssh端口转发·端口转发工具
原来是猿2 小时前
TCP Echo Server 深度解析:从单进程到线程池的演进之路(上)
服务器·网络·tcp/ip
小新同学^O^2 小时前
简单学习 --> TCP协议
java·网络·tcp
其实防守也摸鱼3 小时前
软件安全与漏洞--软件安全设计
运维·网络·安全·网络安全·密码学·需求分析·软件安全
一只数据集3 小时前
NVIDIA Nemotron AIQ Agentic Safety Dataset:面向企业级智能体系统的安全与防护评估数据集全面解析
网络·数据库·安全
你的保护色3 小时前
软件定义网络SDN
网络