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
相关推荐
风行南方1 小时前
密码学之分组密码
网络·密码学
艾莉丝努力练剑2 小时前
OpenCode AI 编程:Ubuntu 24.04 环境安装与使用指南
linux·服务器·网络·人工智能·tcp/ip·ubuntu
谷雪_6583 小时前
Linux 网络命名空间:从内核原理到企业级容器网络架构全景实战
linux·网络·架构
liulilittle3 小时前
KCC 拥塞控制算法缺陷修复记录(26/07/05)
网络·tcp/ip·计算机网络·c·信息与通信·tcp·通信
Tian_Hang3 小时前
Eclipse Ditto 的权限策略
java·服务器·前端·网络·ide·ubuntu·eclipse
ai生成式引擎优化技术4 小时前
从知识连接到智能组织:WSaiOS认知网络的理论框架与系统设计摘要
网络·python·plotly·django·pygame
冰暮流星4 小时前
flask之http请求方法
网络·网络协议·http
K成长日志5 小时前
BLE协议之设备地址
网络·物联网·网络协议·嵌入式·蓝牙·ble
广州市顺风搬家服务有限公司5 小时前
实验室搬迁科普专业流程防护标准与合规核心要点
网络·其他·安全
liulilittle6 小时前
KCC 边界缺陷深度分析:六问题根源与解决方案
网络·网络协议·tcp/ip·计算机网络·信息与通信·ip·通信