-
Notifications
You must be signed in to change notification settings - Fork 327
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
Amend nginx/vouch handler to not validate OPTIONS requests #216
Comments
If you're running into OPTIONS issues I think the best place to handle that is Nginx...
|
Thanks @bnfinet . Agree nginx sounds like a good place to handle this. Want me to create a PR to update the example nginx config? I imagine that most users would want this check in case an OPTIONS request ever hits the reverse proxy. so could be sensible to add your if-request-equals-options check as an uncommented example? |
@jbwtan1 I've added a link to this issue from the README Thanks for making VP better! |
I added this but still get an error. It is caused when the redirect link is hit when the tab is left open and probably the cookies expire after a period. Added the following to
But still get something like:
Any clues what I could be missing? |
@snowPu no idea. Happy to help but I need more info. Could you please put your full nginx config for that app into a gist. |
@snowPu that config looks good to my eyes. I'm not sure why it's not responding with You could add additional logging with...
and then
That might tease out whatever is going on. |
Expected behavior
IIRC when a browser performs an OPTIONS request as part of a CORS request, it intentionally does not send a vouch cookie. I believe that vouch will still try and validate the request and check if the jwt is present so the OPTIONS request will always fail.
A clear and concise description of what you expected to happen.
I expect vouch to allow OPTIONS requests to the application (where it should respond regardless of whether user is logged in or not)
The text was updated successfully, but these errors were encountered: