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 on failed auth for EventStream #347

Merged
merged 1 commit into from
Mar 29, 2024
Merged

Conversation

minrk
Copy link
Member

@minrk minrk commented Mar 29, 2024

302 redirects should only be on for-humans pages, since the EventStream request can't follow the login process.

avoids redirects that won't work for EventStream requests
# raise on failed auth, not redirect
# can't redirect EventStream to login
# same as Jupyter's APIHandler
raise web.HTTPError(403)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

An alternative would be for the EventStream to inherit from APIHandler instead of the base JupyterHandler, which already has this logic.

@consideRatio consideRatio merged commit 79784e0 into jupyterhub:main Mar 29, 2024
9 checks passed
@consideRatio
Copy link
Member

This seemed more relevant to have as a "bug" or "maintenance" in the changelog than an "enhancement", I went for "bug" and suggested version 1.2.1 to be released with it in #348 @minrk

@minrk
Copy link
Member Author

minrk commented Mar 29, 2024

Sure! I don't think it's a super important distinction, but either interpretation is valid.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants