Skip to content

Commit cb4766d

Browse files
committed
Ensure correct generation of "X-Forwarded"-Headers
1 parent bf32cf3 commit cb4766d

File tree

1 file changed

+5
-0
lines changed
  • jupyter_server_proxy/standalone

1 file changed

+5
-0
lines changed

jupyter_server_proxy/standalone/app.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,11 @@ def get_proxy_base_class(self) -> tuple[type | None, dict]:
200200

201201
def get_proxy_attributes(self) -> dict:
202202
attributes = super().get_proxy_attributes()
203+
204+
# The ProxyHandler will be listening on "{base_url}/" instead of "{base_url}/{name}".
205+
# Needed for correct header generation of "X-Forwarded-Context", etc.
206+
attributes["proxy_base"] = "/"
207+
203208
attributes["requested_port"] = self.server_port
204209
attributes["skip_authentication"] = self.skip_authentication
205210

0 commit comments

Comments
 (0)