From a84926239a7d3f4388244004d86b03d86836981a Mon Sep 17 00:00:00 2001 From: Stephane Martin Date: Mon, 5 Sep 2016 23:34:15 +0200 Subject: [PATCH] fix request.environ -> request.headers to get HTTP headers from reverse proxy --- realms/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/realms/__init__.py b/realms/__init__.py index ec00c76..e04c122 100644 --- a/realms/__init__.py +++ b/realms/__init__.py @@ -222,7 +222,7 @@ def create_app(config=None): @app.before_request def proxy_auth(): from realms.modules.auth.proxy.models import User as ProxyUser - remote_user = request.environ.get(app.config["AUTH_PROXY_HEADER_NAME"]) + remote_user = request.headers.get(app.config["AUTH_PROXY_HEADER_NAME"]) if remote_user: if current_user.is_authenticated: if current_user.id == remote_user: