[rabbitmq-discuss] Changing SockJS URL used in iframe mode

Marek Majkowski majek04 at gmail.com
Fri Nov 30 11:46:20 GMT 2012


On Fri, Nov 30, 2012 at 2:11 AM, Adam Ashley <aashley at adamashley.name> wrote:
> I'm trying to make use of the Web STOMP plugin with RabbitMQ 3.0.0 and am
> running into a problem with using the CDN hosted versions of sockjs.js as
> used within the iframe comms mode.
>
> Our production sites are deployed with no or minimal internet access so
> relying on files hosted on the internet for a critical component like the
> message queue connectivity is a none starter. Unfortunately I also need to
> support some legacy clients where the iframe options are the only reliable
> connection method.
>
> Looking into the source code for the module I came up with the following
> config file that as far as I could tell should change it use an internally
> hosted version of sockjs.
>
> [
>     {sockjs, [
>         {sockjs_url, "http://host.internal/htmlUi/js/sockjs.js"}
>     ]}
> ].
>
> However it doesn't seem to work. In place of sockjs I've tried sockjs,
> sockjs_handler, rabbitmq_sockjs and rabbitmq_sockjs_handler none of them
> work. Can someone point out what I'm missing?

Looking at the source code:
   https://github.com/rabbitmq/rabbitmq-web-stomp/blob/master/src/rabbit_ws_sockjs.erl#L29

It looks like this has higher chances to work:

[
    {sockjs, [
        {sockjs_opts, [
            {sockjs_url, "http://host.internal/htmlUi/js/sockjs.js"}
         ]}
    ]}
].

Can you give it a shot?

Marek


More information about the rabbitmq-discuss mailing list