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

Added Access-Control headers if CORS is enabled #53

Merged
merged 2 commits into from
Nov 1, 2017

Conversation

jcchalte
Copy link

@jcchalte jcchalte commented Oct 29, 2017

First PR here, let's hope I do it well :)

Without setting withCredentials to true on javascript XHR, CORS is disabled. I added that in the relevant part of the code.

But there is something strange as

  • the containing "if" part already refers to the "withCredential" field
  • Another part of the code already reference this, but in a commented line

By reading the code, I suspect that maybe the developer knew but removed references to withCredential for a purpose. Maybe I am missing something here but the MDN article on withCredential does not indicate any side-effect.

https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/withCredentials

@janhommes
Copy link
Owner

Looks good for me -> merge. Don't remember why it was left out...

@janhommes janhommes merged commit 1e77c8a into janhommes:master Nov 1, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants