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
相关推荐
0和1的舞者1 小时前
网络通信的奥秘:HTTP详解 (七)
服务器·网络·网络协议·http·okhttp·软件工程·1024程序员节
Ashlee_code1 小时前
BSS供应商:电信与金融领域的幕后支撑者
大数据·网络·金融·系统架构·跨境·金融机构·场外期权
节点小宝2 小时前
节点小宝免费版流量机制解析:点对点直连技术与备用流量设计
网络·网络协议·p2p
创业之路&下一个五年3 小时前
按照ip的转换为二进制的方式理解a\b\c类地址的边界
服务器·网络·tcp/ip
陌路203 小时前
Linux29初识网络:核心概念与分层逻辑
网络
huangdengji4 小时前
基于openresty反向代理、dns劫持、实现对http请求、响应内容抓包
网络协议·http·openresty
Acrelhuang4 小时前
覆盖全场景需求:Acrel-1000 变电站综合自动化系统的技术亮点与应用
大数据·网络·人工智能·笔记·物联网
阿猿收手吧!4 小时前
【Linux网络】shutdown()与close()的区别
linux·网络
記億揺晃着的那天5 小时前
解密 HTTPS:从握手到安全通信
网络协议·安全·https·ssl证书
神仙别闹7 小时前
基于C语言 HTTP 服务器客户端的实验
服务器·c语言·http