fixed dev auth
This commit is contained in:
1 parent
44cd8565b1
commit
bd417cf7c9
1 file changed
+1
-1
@@ -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)
|
||||
|
||||
Reference in new issue
Block a user