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 小时前
网络:4.1加餐 - 进程间关系与守护进程
linux·网络
xinxinhenmeihao3 小时前
隧道代理和住宅IP有何不同》各有什么优缺点?
服务器·网络·tcp/ip
小米里的大麦4 小时前
050 传输层 —— UDP
网络·网络协议·udp
adnyting4 小时前
【Linux日新月异(六)】CentOS 7网络命令深度解析:从传统到现代网络管理
linux·网络·centos
陌路206 小时前
Linux35 TCP状态转换图
网络·网络协议·tcp/ip
Awkwardx7 小时前
Linux网络编程—应用层自定义协议与序列化
linux·网络
k***3887 小时前
Node.js HTTP模块详解:创建服务器、响应请求与客户端请求
服务器·http·node.js
极客BIM工作室8 小时前
LSTM门控机制:本质是神经元构成的小型网络
网络·机器学习·lstm
i***48619 小时前
Nginx中$http_host、$host、$proxy_host的区别
运维·nginx·http
qq_2789841310 小时前
ubuntu vlan网络设置
linux·服务器·网络