Browse Source

fix request.environ -> request.headers to get HTTP headers from reverse proxy

master
Stephane Martin 7 years ago
parent
commit
034cc1febd
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      realms/__init__.py

+ 1
- 1
realms/__init__.py View File

@@ -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:


Loading…
Cancel
Save