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
相关推荐
Yuki’36 分钟前
网络编程基础
网络
青铜发条2 小时前
【python】python进阶——网络编程
运维·服务器·网络
AD钙奶-lalala3 小时前
HTTP response code 200 206 416详解
网络·网络协议·http
sun03223 小时前
使用 javax.net.ssl.HttpsURLConnection 发送 HTTP 请求_以及为了JWT通信选用OSS的Jar的【坑】
http·.net·ssl
智慧源点3 小时前
阿里云高可用生产环境网络架构实战:VPC规划与多可用区部署
网络·阿里云·架构
云望无线图传模块3 小时前
12公里无人机图传模组:从模糊到超高清的飞跃,抗干扰能力全面升级
网络·物联网·无人机
UNbuff_03 小时前
Linux ip 命令使用指南
linux·网络·tcp/ip
斯普信专业组4 小时前
多输入(input)多输出(output)验证
运维·服务器·网络·fluent-bit
自我陶醉@4 小时前
计算机网络---网络体系结构
网络·计算机网络·考研·智能路由器·408
康弘雲4 小时前
路由器无线桥接二级验证网络(初始密码和网页登录个人账号和密码)
网络·智能路由器