Some issues when using Signalr in cross domain #461

Closed
fantasia949 opened this Issue Jun 19, 2012 · 2 comments

Comments

Projects
None yet
2 participants

The first issue happend when using long pooling transport in IE9.

In jquery.signalr-0.5.1.js, line 447

  getUrl: function (connection, transport, reconnecting, appendReconnectUrl) {
        /// <summary>Gets thes url for making a GET based connect request</summary>
        var baseUrl = transport === "webSockets" ? "" : connection.baseUrl,
            url = baseUrl + connection.appRelativeUrl,

The point is connection.baseUrl points to origin domain, not the target domain.

The second issue happens when using websocket in all supported browsers

In jquery.signalr-0.5.1.js, line 606:

         protocol = info.protocol === "https:" ? "wss://" : "ws://";

          url = protocol + info.host;

Once more, info.host points to origin domain, not the target domain.

Updated:
Try with the url has pattern like this:

//localhost (not include http:)

Owner

davidfowl commented Jun 20, 2012

Is that supposed to be a suggestion? Can you paste an entire code sample, or even better, send a pull request.

@ghost ghost assigned davidfowl Jun 24, 2012

@davidfowl davidfowl closed this in c2b98ad Jun 24, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment