net::ERR_INSECURE_RESPONSE while making ajax request from node-webkit

走远了吗. 提交于 2019-12-21 07:04:38

问题


when I'm trying to make ajax request with jquery to:

https://localhost:8443/uri

I get this error:

net::ERR_INSECURE_RESPONSE

I'm using self signed certificate, in package.json I have these parameters:

"chromium-args": "--ignore-certificate-errors --auth-schemes='basic --auth-server-whitelist='*localhost:8443' --auth-negotiate-delegate-whitelist='*localhost:8443'''",

does anybody know how I can add self signed certificates to node-webkit's truststore !?

OS: ubuntu 14.10


回答1:


The problem here is that the browser is blocking the call to that server because that server has an invalid certificate. Since it is a localhost server, it is a self-signed certificate. The best way to get around this is to try one of the following...

  • Change the localhost:8443 server to use a valid certificate
  • From your browser load the page, https://localhost:8443/, accept the invalid certificate, and then try the ajax call.


来源:https://stackoverflow.com/questions/26936078/neterr-insecure-response-while-making-ajax-request-from-node-webkit

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!