-
Notifications
You must be signed in to change notification settings - Fork 932
b/68251551: Send headers via URL Param to avoid CORS preflight round-trip. #322
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI
$httpHeaders is formally defined here
https://github.com/google/closure-library/blob/master/closure/goog/net/rpc/httpcors.js#L40
Thanks @wenbozhu I added that in a comment (it's not convenient to use the actual constant from closure from here, and since it can't ever change, I don't think it's worth the trouble). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Magic!
Please add a note to the changelog as a part of this PR. |
Agh! Good call, but I already pushed the merge button. :-( I'll send another PR... |
I verified that our Authorization header is sent via the the '$httpHeaders' URL parameter now, the OPTIONS network round-trip no longer occurs, and our authentication token is still correctly respected by the backend.