Commit 73e2760c authored by Ian Scott's avatar Ian Scott Committed by Wandenberg Peixoto

Use JSONP when port numbers don't match.

parent 61773c9e
......@@ -659,7 +659,9 @@
this.xhrSettings.url = getSubscriberUrl(this.pushstream, this.pushstream.urlPrefixLongpolling);
var domain = extract_xss_domain(this.pushstream.host);
var currentDomain = extract_xss_domain(window.location.hostname);
this.useJSONP = (domain !== currentDomain) || this.pushstream.longPollingUseJSONP;
var port = this.pushstream.port;
var currentPort = window.location.port;
this.useJSONP = (domain !== currentDomain) || (port !== currentPort) || this.pushstream.longPollingUseJSONP;
this.xhrSettings.scriptId = "PushStreamManager_" + this.pushstream.id;
if (this.useJSONP) {
this.pushstream.longPollingByHeaders = false;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment