忽略https域名校验不通过
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
本文来自博客园,作者:Lin-Grocery,转载请注明原文链接:https://www.cnblogs.com/moniter/articles/hu-luehttps-yu-ming-xiao-yan-bu-tong-guo.html