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
相关推荐
卓小帅的博客2 小时前
关于实现远程服务器使用本地网络的清晰简洁的教程
服务器·网络·vscode·连接超时
原神启动12 小时前
云计算大数据——Nginx入门篇( Web 核心概念、HTTP/HTTPS协议 与 Nginx 安装)
大数据·http·云计算
阿珊和她的猫2 小时前
HTTP 状态码 404:深入解析与实践应对
网络·网络协议·http
半个西瓜.3 小时前
车联网NFC测试:NFC信号嗅探测试.
网络·安全·网络安全·车载系统
木童6624 小时前
nginx安装步骤详解
linux·运维·服务器·网络·nginx
jinxinyuuuus5 小时前
局域网文件传输:连接逻辑的回归——基于“广播域”而非“身份认证”的P2P架构
网络协议·架构·p2p
tan180°5 小时前
Linux网络IP(上)(15)
linux·网络·tcp/ip
“αβ”7 小时前
MySQL库的操作
linux·服务器·网络·数据库·c++·mysql·oracle
_星辰大海乀7 小时前
TCP 协议
网络·网络协议·tcp/ip·tcp
LZ7工作室9 小时前
MAC编程:在MACOS安装和使用 Git 的方法
网络·git·macos·github·个人开发