Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplified cross domain check a little by using jQuery. #190

Closed
wants to merge 1 commit into from

Conversation

wbyoung
Copy link
Contributor

@wbyoung wbyoung commented Jun 15, 2014

It seems to make sense to me to use jQuery to check for whether or not the request is cross-domain since jQuery already does this for us.

@marcoow
Copy link
Member

marcoow commented Jun 16, 2014

Unfortunately the crossDomain property doesn't actually identify a cross domain request but is used to force a cross domain request - see docs here.

@marcoow marcoow closed this Jun 16, 2014
@wbyoung
Copy link
Contributor Author

wbyoung commented Jun 16, 2014

Those docs indicate it will be set to true for cross domain requests. Also, I believe that's the point of providing two options arguments to ajaxPrefilter where it's also indicating that it'd be changed.

Finally, in the source, it's certainly being set.

@marcoow
Copy link
Member

marcoow commented Jun 16, 2014

Hm, I thought I tried to use it once and it didn't woe las expected. Can you add a test and see whether it actually works as expected?

@marcoow marcoow reopened this Jun 16, 2014
@wbyoung
Copy link
Contributor Author

wbyoung commented Jun 16, 2014

These tests already cover this.

@marcoow
Copy link
Member

marcoow commented Jun 17, 2014

You're right - no idea why that didn't work (or I thought it didn't work) when I tried it...

@marcoow
Copy link
Member

marcoow commented Jun 17, 2014

merged 9f3e081

@marcoow marcoow closed this Jun 17, 2014
@marcoow marcoow added this to the 0.5.4 milestone Jun 17, 2014
@wbyoung wbyoung deleted the jquery-cross-domain-check branch June 17, 2014 13:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants