File tree 1 file changed +8
-4
lines changed
vendor/assets/javascripts
1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change 176
176
// This is a workaround to a IE bug.
177
177
urlAnchor . href = urlAnchor . href ;
178
178
179
- // Make sure that the browser parses the URL and that the protocols and hosts match.
180
- return ! urlAnchor . protocol || ! urlAnchor . host ||
181
- ( originAnchor . protocol + "//" + originAnchor . host !==
182
- urlAnchor . protocol + "//" + urlAnchor . host ) ;
179
+ // If URL protocol is false or is a string containing a single colon
180
+ // *and* host are false, assume it is not a cross-domain request
181
+ // (should only be the case for IE7 and IE compatibility mode).
182
+ // Otherwise, evaluate protocol and host of the URL against the origin
183
+ // protocol and host
184
+ return ! ( ( ( ! urlAnchor . protocol || urlAnchor . protocol === ':' ) && ! urlAnchor . host ) ||
185
+ ( originAnchor . protocol + "//" + originAnchor . host ===
186
+ urlAnchor . protocol + "//" + urlAnchor . host ) ) ; //
183
187
} catch ( e ) {
184
188
// If there is an error parsing the URL, assume it is crossDomain.
185
189
return true ;
You can’t perform that action at this time.
0 commit comments