且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

未从Firefox的ajax调用上加载SSL客户端证书

更新时间:2022-02-22 21:36:34

默认情况下,Firefox似乎发送带有跨域XHR请求的客户端证书.在XHR实例上设置withCredentials=true可以为我解决此问题.请注意,我也没有在Chrome(只有Firefox)上看到此问题.

Firefox appears to not send the client certificate with a cross-origin XHR request by default. Setting withCredentials=true on the XHR instance resolved the issue for me. Note that I also did not see this problem with Chrome--only Firefox.

有关更多信息,请参见此Mozilla Dev Network博客文章一个>.特别是以下语句:

For more info see this Mozilla Dev Network blog post. In particular, the following statement:

默认情况下,在跨站点XMLHttpRequest调用中,浏览器将 不发送凭据.调用XMLHttpRequest对象时,必须设置一个特定的标志.

By default, in cross-site XMLHttpRequest invocations, browsers will not send credentials. A specific flag has to be set on the XMLHttpRequest object when it is invoked.