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

add trailing slash for jupyterhub proxy paths #2387

Merged
merged 1 commit into from
Apr 10, 2024

Conversation

Adam-D-Lewis
Copy link
Member

@Adam-D-Lewis Adam-D-Lewis commented Apr 9, 2024

Reference Issues or PRs

Fixes #2383

This PR redirects any attempts to visit https://<domain>/user/.*/proxy/(\d+) to the same path, but with the trailing slash appended.
e.g.
https://nebari.quansight.dev/user/[email protected]/proxy/5333 redirects to https://nebari.quansight.dev/user/[email protected]/proxy/5333/

Value and/or benefit

Users don't expect the closing slash to be meaningful, and users often waste several hours when facing this issue. This PR removes this potential issue for users by redirecting them.

What does this implement/fix?

Put a x in the boxes that apply

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds a feature)
  • Breaking change (fix or feature that would cause existing features not to work as expected)
  • Documentation Update
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no API changes)
  • Build related changes
  • Other (please describe):

Testing

  • Did you test the pull request locally?
  • Did you add new tests?

Any other comments?

Copy link
Contributor

@viniciusdc viniciusdc left a comment

Choose a reason for hiding this comment

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

LGTM, thanks @Adam-D-Lewis !! I also thought we could use ReplacePathRegex instead, but that would lead to issues with paths from the proxied app itself. So this looks like the only viable solution indeed. Can we have a note on our docs possibly somewhere related to proxying web apps (there might be a tutorial for panel), just to let users know this is in place?

@Adam-D-Lewis
Copy link
Member Author

Thanks Vini, I'll work on some docs as part of nebari-dev/nebari-docs#240

@Adam-D-Lewis Adam-D-Lewis merged commit e743bad into develop Apr 10, 2024
26 checks passed
@Adam-D-Lewis Adam-D-Lewis deleted the jupy-proxy-srvr-slash branch April 10, 2024 15:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

[ENH] - Force the trailing slash when using jupyter server proxy
2 participants