The error No 'Access-Control-Allow-Origin' header is present on the requested resource
indicates that you are making a Cross-domain (CORS) request and the necessary CORS headers are not available.
You are making a cross-domain request because the BOSH service (i.e. http-bind
) is being served on a different port than your website.
I see in your HTTP Bind settings for OpenFire that you have enabled CORS. Perhaps you are using a Browser that doesn't support CORS? (Like IE9).
In any case, you can solve this for all browsers by instead of using CORS, reverse proxying the http-bind
address to be on the same domain and port as from which the HTML is served.
This snippet in Apache will do that for you: (I'm assuming you're serving the site on port 80).
<VirtualHost *:80>
ServerName localhost
RewriteEngine On
RewriteRule ^/http-bind(.*) http://localhost:7070/http-bind$1 [P,L]
</VirtualHost>
So you can then access the BOSH service (i.e. http-bind
) on the same domain (and port) as the site itself.
For more info, see Converse.js documentation on this