更新时间:2022-02-14 00:05:44
您不能以编程方式绕过由浏览器来实现,如果你可以将无效的安全层完全的SSL错误/警告行为。
You cannot programmatically bypass the SSL error/warning behaviour implemented by the browser, if you could it would invalidate that security layer entirely.
如果你这样做是在本地/中的的Windows 的域环境中只需添加签名的证书的trusted商店。
If you are doing this locally/in a Windows domain environment simply add the self signed cert to the trusted store.
此外证明书(典型值)发给域名而非IP地址,所以你需要在你的Ajax调用做同样的。
Additionally a certificate is (typically) issued to a domain name not an IP address so you will need to do the same in your Ajax call.