metajack / strophejs

The Strophe.js repository has moved to https://github.com/strophe/strophejs

Home Page:http://strophe.im/strophejs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to solve CROSS exception

gowthaman-murugan opened this issue · comments

Technology : spring, maven 2, convers js
server : apache tomcat 6
Application url : "https://localhost:8443/"

while using 7070 (http://localhost:7070/http-bind/)
Blocked loading mixed active content "http://localhost:7070/http-bind/"
req.xhr.open("POST", this.service, true);

when i am using 7443(https://localhost:7443/http-bind/)
stroph.js line:2969 req.xhr.send(req.data);
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://localhost:7443/http-bind/. This can be fixed by moving the resource to the same domain or enabling CORS

How to resolve this ?

You did not actually say anything about the XMPP server you are using, so either your server (or the BOSH proxy if you use one) has to send correct CORS headers or you need to have your site on the same domain as your bosh url (different ports are different domains).
The documentation of your XMPP server or BOSH proxy should tell you how to set up correct CORS headers

Also, please do not report bugs here, the repository has moved here: https://github.com/strophe/strophejs