Prosodical Thoughts

News, announcements and thoughts from the Prosody IM team

Proxy-less BOSH with Prosody

by Matthew Wild
Tags: features

Prompted by Jack Moffitt’s post on cross-domain BOSH I have added support for the necessary HTTP headers to Prosody. This means that providing the user has a modern browser, no proxy is required to connect to the BOSH URL (usually running on a separate port to the normal web server) via (for example) Strophe.js or JSJaC.

In Prosody trunk (to become the 0.7 version) simply add to your config:

cross_domain_bosh = true

This allows a script on any website to connect to your BOSH URLs. Alternatively you can restrict requests only to certain domains (such as your own), for example:

cross_domain_bosh = { "http://prosody.im", "http://jabber.org" }

would allow a script on either of those sites to connect.

Have fun playing with this new feature - I know I shall. Feedback welcome as always.


About

Prosody is a lightweight and flexible XMPP server designed with ease-of-use and extensibility in mind.

⚛️ Atom feed

Recent Posts