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
相关推荐
wuxuand1 小时前
网络安全-恶意流量检测评估指标-混淆矩阵
网络·安全
柒.梧.8 小时前
吃透HTTP及相关协议核心区别,从基础到进阶全覆盖
网络·网络协议·http
forAllforMe8 小时前
用STM32+LAN9252, 生成一个etherCAT 从机系统,实现数据采集功能
网络·stm32·嵌入式硬件
程序员小寒9 小时前
前端性能优化之白屏、卡顿指标和网络环境采集篇
前端·javascript·网络·性能优化
wal13145209 小时前
OpenClaw教程(九)—— 彻底告别!OpenClaw 卸载不残留指南
前端·网络·人工智能·chrome·安全·openclaw
Godspeed Zhao9 小时前
现代智能汽车系统——SOME/IP与DDS0
网络协议·tcp/ip·汽车
白藏y10 小时前
【协议】SSE协议和WebSocket协议
网络·websocket·网络协议
运维行者_11 小时前
网络监控方案从零开始 -- 企业级完整指南
大数据·运维·服务器·网络·数据库·人工智能·自动化
朱一头zcy12 小时前
简单理解NAT(网络地址转换)模式和桥接模式
网络·桥接模式·nat
加农炮手Jinx12 小时前
Flutter 三方库 cloudflare 鸿蒙云边协同分发流适配精讲:直连全球高速存储网关阵列无缝吞吐海量动静态画像资源,构筑大吞吐业务级网络负载安全分流-适配鸿蒙 HarmonyOS ohos
网络·flutter·harmonyos