Skip to content

Conversation

@ryanlovett
Copy link
Collaborator

Preserve the proxy prefix in the path info when the proxied server sends the client to a location without a scheme or host.

ryanlovett and others added 2 commits November 3, 2025 12:00
Preserve the proxy prefix in the path info when the proxied server sends the client to a location without a scheme or host.
self._headers = httputil.HTTPHeaders()
for header, v in rewritten_response.headers.get_all():
if header not in ("Content-Length", "Transfer-Encoding", "Connection"):
# Rewrite Location header in redirects to preserve proxy prefix
Copy link
Member

Choose a reason for hiding this comment

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

I think this should only be rewritten if absolute_url == False:
https://jupyter-server-proxy.readthedocs.io/en/stable/server-process.html#absolute-url

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Fixed! Thanks for catching that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

2 participants