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
相关推荐
hrrrrb7 分钟前
【TCP/IP】5. IP 协议
网络协议·tcp/ip·php
hhh123987_12 分钟前
以太网基础⑤UDP 协议原理与 FPGA 实现
网络·网络协议·udp
灰海15 分钟前
封装WebSocket
前端·网络·websocket·网络协议·vue
DemonAvenger24 分钟前
实现可靠的 UDP 协议:Go 语言版本
网络协议·架构·go
W111115_29 分钟前
网络综合实验
linux·运维·服务器·网络
cui_win31 分钟前
【网络】Linux 内核优化实战 - net.ipv4.tcp_sack
linux·网络·tcp/ip
YC运维1 小时前
OSPF实验以及核心原理全解
运维·网络·网络协议·智能路由器
uuu_柚子1 小时前
IPv4和IPv6双栈配置
网络·智能路由器
喜欢你,还有大家1 小时前
实训八——路由器与交换机与网线
网络·智能路由器
古希腊数通小白(ip在学)1 小时前
HCIA实现不同vlan间的通信
linux·服务器·网络