Can't turn crossDomain off with element.data('cross-domain', false) #232

Closed
shinichinomura opened this Issue Dec 27, 2011 · 1 comment

Comments

Projects
None yet
2 participants

I want to turn crossDomain parameter off when I generate ajax request from http://myhost.mydomain/ to https://myhost.mydomain/ (jQuery determines the request as cross-domain one because the protocol is different between these two urls).

For the purpose I wrote as below.

$("#the_anchor_id").data('cross-domain', false);

jQuery, however, determines the request as cross-domain automatically, because jquery_ujs.js sets crossDomain parameter null in line 105 (version 1.0.17)

crossDomain = element.data('cross-domain') || null,

I guess the line should be

crossDomain = element.data('cross-domain') === undefined ? null : element.data('cross-domain'),

Thank you.

Member

JangoSteve commented Aug 13, 2012

Thanks for the report. Fixed.

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