Explorar el Código

add support for non-standard server ports

Peter Bieringer hace 2 años
padre
commit
a3aa0ce7d9
Se han modificado 1 ficheros con 1 adiciones y 0 borrados
  1. 1 0
      radicale/app/move.py

+ 1 - 0
radicale/app/move.py

@@ -32,6 +32,7 @@ def get_server_netloc(environ: types.WSGIEnviron, force_port: bool = False):
         host = environ["HTTP_X_FORWARDED_HOST"]
         proto = environ.get("HTTP_X_FORWARDED_PROTO") or "http"
         port = "443" if proto == "https" else "80"
+        port = environ["HTTP_X_FORWARDED_PORT"] or port
     else:
         host = environ.get("HTTP_HOST") or environ["SERVER_NAME"]
         proto = environ["wsgi.url_scheme"]