Merge remote-tracking branch 'auth_token/fix/reverse-proxy-authentication-with-bearer-token'

pull/1202/head
Ozzieisaacs 5 years ago
commit b152d3e06d

@ -123,12 +123,6 @@ def load_user(user_id):
@lm.request_loader @lm.request_loader
def load_user_from_request(request): def load_user_from_request(request):
auth_header = request.headers.get("Authorization")
if auth_header:
user = load_user_from_auth_header(auth_header)
if user:
return user
if config.config_allow_reverse_proxy_header_login: if config.config_allow_reverse_proxy_header_login:
rp_header_name = config.config_reverse_proxy_login_header_name rp_header_name = config.config_reverse_proxy_login_header_name
if rp_header_name: if rp_header_name:
@ -138,6 +132,12 @@ def load_user_from_request(request):
if user: if user:
return user return user
auth_header = request.headers.get("Authorization")
if auth_header:
user = load_user_from_auth_header(auth_header)
if user:
return user
return return

Loading…
Cancel
Save