Skip to content
This repository has been archived by the owner on Feb 16, 2023. It is now read-only.

Commit

Permalink
fixed dev auth
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonas Winkler committed Nov 9, 2020
1 parent 44cd856 commit bd417cf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/paperless/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit bd417cf

Please sign in to comment.