mirror of
https://github.com/zulip/zulip.git
synced 2025-11-02 21:13:36 +00:00
run-dev: Set HTTP header to show we're proxing from port 9991.
Previously, while Django code that relied on EXTERNAL_HOST and other settings would know the Zulip server is actually on port 9991, the upcoming Django SAML code in python-social-auth would end up detecting a port of 9992 (the one the Django server is actually listening on). We fix this using X-Forwarded-Port.
This commit is contained in:
@@ -319,6 +319,8 @@ class CombineHandler(BaseWebsocketHandler):
|
||||
# type: () -> None
|
||||
if 'X-REAL-IP' not in self.request.headers:
|
||||
self.request.headers['X-REAL-IP'] = self.request.remote_ip
|
||||
if 'X-FORWARDED_PORT' not in self.request.headers:
|
||||
self.request.headers['X-FORWARDED-PORT'] = str(proxy_port)
|
||||
if self.request.headers.get("Upgrade", "").lower() == 'websocket':
|
||||
return super().prepare()
|
||||
url = transform_url(
|
||||
|
||||
Reference in New Issue
Block a user