curl curl 報錯: curl: (51) Unable to communicate securely with peer: requested domain name does not match the server's certificate. 忽略方法 添加臨時 功能變數名稱解析 緩存的方式 ...
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