-
Notifications
You must be signed in to change notification settings - Fork 1
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
Some adjustments #2
Conversation
@kagesenshi Could you have a look if I'm not missing something. I make the adjustments after reading the Mozilla documentation. Maybe in practice it looks different. |
hmm .. while the Vary header is ok, allow-credentials header i think i need some time to validate, as not returning true for that might cause browser to ignore the resource if the resource have credentials (authorization header, cookie, tls cert). Probably should return true if user is authorized, but i'll look at that later. |
Not sure if I follow. After the PR, when The third change is setting the |
@kagesenshi Are you able to review the PR like this or should I split it in 3 PRs for each commit? |
@kagesenshi @faassen @href could someone of you review this PR? |
As someone without any CORS knowledge I think I should not weigh in on this. |
@blaflamme Maybe you can review? I remember you also worked on CORS integration. |
This PR do 3 things:
Access-Control-Allow-Credentials
header whenallow_credentials
is notTrue
.See documentation.
Vary
header to 'Origin' whenallowed_origin
specifies a URI.See documentation.
allow_credentials
by default toFalse
.Specifying "*" as a wildcard for the
Access-Control-Allow-Origin
header is only allowed forrequests without credentials.
So the default
'allowed_origin': '*'
and'allow_credentials': True
are in conflict which each other.