- A+
所属分类:linux技术
curl
curl 报错:
curl: (51) Unable to communicate securely with peer: requested domain name does not match the server's certificate.
-
忽略方法
- 添加临时 域名解析 缓存的方式,保证对外域名可以直接解析到内网IP
# 手工指定域名DNS解析结果,比如把subdomain.example.com:443解析到10.0.0.100:443 curl -v --resolve subdomain.example.com:443:10.0.0.100 https://subdomain.example.com/
- 直接关闭域名校验 —insecure
# 禁止domain校验 curl -v --insecure https://subdomain.example.com/
wget
增加参数:—no-check-certificate
wget 'https://subdomain.example.com/goods.json' --no-check-certificate