-
Notifications
You must be signed in to change notification settings - Fork 284
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
CORS preflight OPTIONS requests should bypass authentication #78
Comments
I did some searching around, and there are a bunch of other proxy projects that have implemented this. Here's one example https://github.com/istio/proxy/issues/651 |
Hi @nitper thank you bug report. I didn't know that about Could you point me in the direction right direction to read more about Ref for later self: |
Your second link as well as the spec I posted originally are the best resources I have seen. There are various blog posts out there but they all seem to reference these two links. There's also this page https://enable-cors.org/server.html which links to this handy server flowchart. Since Pomerium is a proxy, I believe it should verify that an I'll need to double-check this, but it seems the preflight For what it's worth, my downstream server is using Echo as the server with the CORS middleware. My frontend is using axios setting // `withCredentials` indicates whether or not cross-site Access-Control requests
// should be made using credentials
withCredentials: false, // default Pomerium is working just fine with this setup for CORS simple requests |
@desimone I'd be happy to submit a PR. I was thinking about adding a field What do you think? |
@nitper Thank you, a PR would be greatly appreciated! I think the field name of More reading for future travelers: |
Describe the bug
Pomerium is requiring authentication for http
OPTIONS
requests, but the spec says OPTIONS requests should not include user credentials. These requests should be passed downstream without authentication.To Reproduce Steps to reproduce the behavior:
Browser on
https://bob.corp.domain.com/
makes a CORS request tohttps://alice.corp.domain.com/
like this:Pomerium will try to redirect to the authentication provider.
Expected behavior
Pomerium should not require auth for HTTP
OPTIONS
requests.Environment:
pomerium --version
): v0.0.3+41c42f5Configuration file(s):
Logs(s):
The text was updated successfully, but these errors were encountered: