03-20-2015 08:45 AM
Hello,
We are having our 10.5 CUP server with the BOSH url in https://IP:7335/httpbinding.
When trying to access from the web application using CORS the we got the following response
<stream:error xmlns:stream="http://etherx.jabber.org/streams"><xml-not-well-formed xmlns="urn:ietf:params:xml:ns:xmpp-streams"/></stream:error>,
The console log in the Chrome browser shows,
Bosh URL is: https://IP:7335/httpbinding jabberwerx.js:421
OPTIONS https://IP:7335/httpbinding net::ERR_INSECURE_RESPONSE
We have the connect function
connect: function() {
var http="https";
var host=<IP>;
var arg = {httpBindingURL : http + "://" + host + ":7335/httpbinding",unsecureAllowed: true};
this.client.connect(this.username, this.password,arg);
},
Is there any other arguments to be added ?
We are having self-signed certificate as a trust certificate in our CUP server.
Is valid trust certificate other than the self-signed certificate will resolve that issue?
Is there any other way to reslove the issue with the self-signed certificates alone ?
Thanks for you help,
Rajakumar R I
03-23-2015 08:59 AM
You probably want to set unsecureAllowed to false, and/or execute this:
jabberwerx._config.unsecureAllowed = false; |
You can use a self-signed certificate, but you need to set the browser to accept it. This is easy to do in Firefox. It's a little more complicated in Chrome. I don't bother, myself. I simply browse to the BOSH URL in Chrome, then click through the prompts to allow access to that page. After that, Jabber SDK works as expected. The only downside to that is that you have to do this every time you start Chrome.
I don't recall the exact process to get Chrome to accept the certificate permanently, but you can google it. Here's the first hit on Google for me:
03-23-2015 10:00 AM
Hi,
Thanks.
We added the self-signed certificate an as exception in Firefox and it works fine with jabberwerx._config.unsecureAllowed = true.
Now we are trying to access the BOSH https url from a XUL runner application (Mozilla xul runner in SWT).
Unlike the Firefox in the XUL runner we are not able to add the exception and it throws the exception
<stream:error xmlns:stream="http://etherx.jabber.org/streams"><xml-not-well-formed xmlns="urn:ietf:params:xml:ns:xmpp-streams"/></stream:error>
Is there any way to bypass the self-signed certificate in xul runner application ?
Thanks in advance.
,
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide