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 分钟前
2026 年充电桩协议新趋势:云快充协议 3.0 有哪些升级亮点?
网络·充电桩·云快充·充电系统
IT北辰13 分钟前
企业档案管理系统 PRD 合规章节(完整版)
网络
.select.14 分钟前
HTTP2
网络协议·http2
F1FJJ22 分钟前
Shield CLI v0.3.3 新增 PostgreSQL 插件:浏览器里管理 PG 数据库
网络·网络协议·docker·postgresql·容器·go
万象.25 分钟前
docker网络种类,架构及命令
网络·docker·架构
.select.28 分钟前
HTTPS ECDHE 握手解析
网络协议·http·https
北京耐用通信30 分钟前
工业现场通信互通 耐达讯自动化CC-Link IE转Modbus RTU网关
人工智能·物联网·网络协议·自动化·信息与通信
小陈工33 分钟前
Python测试实战:单元测试、集成测试与性能测试全解析
大数据·网络·数据库·人工智能·python·单元测试·集成测试
wefg133 分钟前
【计算机网络】套接字编程(套接字API/UDP和TCP服务器)
服务器·网络·计算机网络
有毒的教程33 分钟前
Ubuntu 安装完成后网络配置教程
linux·网络·ubuntu