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

403 Forbidden if origin header not included for JSON authorization_endpoint response #216

Open
tomlarkworthy opened this issue Apr 18, 2021 · 1 comment

Comments

@tomlarkworthy
Copy link

tomlarkworthy commented Apr 18, 2021

The following is a 403

curl 'https://indieauth.com/auth' -X POST -H 'accept: application/json' \
-H 'referer: https://endpointservices.static.observableusercontent.com/'

The following works

curl 'https://indieauth.com/auth' -X POST -H 'accept: application/json' \
-H 'referer: https://endpointservices.static.observableusercontent.com/' \
-H 'origin: https://endpointservices.static.observableusercontent.com'

Looks like it gets bounced at the nginx level.

Why am I sending a referer header but not an origin header? I am hosting code in a pupeteer instance and when you disable CORS thats how it sends requests (and I don't seem to be able to get rid of the referer header) https://observablehq.com/@endpointservices/serverless-cells

So Chrome B.S. of some sorts. It's not blocking me I can just use the form response instead.

@tomlarkworthy tomlarkworthy changed the title 403 Forbidden if origin header not included for JSON autheorization_endpoint response 403 Forbidden if origin header not included for JSON authorization_endpoint response Apr 18, 2021
@tomlarkworthy
Copy link
Author

tomlarkworthy commented Apr 18, 2021

Someone has had some weird interaction leading to 403 with sinatra before: https://serverfault.com/questions/690540/getting-403-forbidden-w-referer-on-nginxpassenger

Seems close to the symptoms though not exactly the same.

Pretty sure its this:

https://stackoverflow.com/questions/10509774/sinatra-and-rack-protection-setting

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

No branches or pull requests

1 participant