mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-12-12 17:47:08 +01:00
fixed dev auth
This commit is contained in:
parent
44cd8565b1
commit
bd417cf7c9
1 changed files with 1 additions and 1 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue