mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-04-02 13:45:10 -05:00
fixed dev auth
This commit is contained in:
parent
44cd8565b1
commit
bd417cf7c9
@ -9,7 +9,7 @@ class AngularApiAuthenticationOverride(authentication.BaseAuthentication):
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
def authenticate(self, request):
|
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()
|
user = User.objects.filter(is_staff=True).first()
|
||||||
print("Auto-Login with user {}".format(user))
|
print("Auto-Login with user {}".format(user))
|
||||||
return (user, None)
|
return (user, None)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user