From bd417cf7c91f54c153708180730d9339dbc965d4 Mon Sep 17 00:00:00 2001 From: Jonas Winkler Date: Mon, 9 Nov 2020 15:47:22 +0100 Subject: [PATCH] fixed dev auth --- src/paperless/auth.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/paperless/auth.py b/src/paperless/auth.py index 67cb80054..ecd697f0e 100644 --- a/src/paperless/auth.py +++ b/src/paperless/auth.py @@ -9,7 +9,7 @@ class AngularApiAuthenticationOverride(authentication.BaseAuthentication): """ def authenticate(self, request): - if settings.DEBUG and 'Origin' in request.headers and request.headers['Origin'] == 'http://localhost:4200': + if settings.DEBUG and 'Referer' in request.headers and request.headers['Referer'].startswith('http://localhost:4200/'): user = User.objects.filter(is_staff=True).first() print("Auto-Login with user {}".format(user)) return (user, None)