Skip to content

Commit

Permalink
Merge e431ce9 into 7bbb04f
Browse files Browse the repository at this point in the history
  • Loading branch information
matllubos committed Oct 14, 2019
2 parents 7bbb04f + e431ce9 commit f8b7603
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions chamber/config.py
Expand Up @@ -6,6 +6,7 @@
'MULTIDOMAINS_OVERTAKER_AUTH_COOKIE_NAME': None,
'DEFAULT_IMAGE_ALLOWED_CONTENT_TYPES': {'image/jpeg', 'image/png', 'image/gif'},
'PRIVATE_S3_STORAGE_URL_EXPIRATION': 3600,
'AWS_S3_ON': getattr(django_settings, 'AWS_S3_ON', False),
}


Expand Down
4 changes: 2 additions & 2 deletions chamber/multidomains/auth/middleware.py
Expand Up @@ -15,8 +15,8 @@ def get_token(request):
Returns the token model instance associated with the given request token key.
If no user is retrieved AnonymousToken is returned.
"""
if (not request.META.get(header_name_to_django(auth_token_settings.HEADER_NAME)) and
config.CHAMBER_MULTIDOMAINS_OVERTAKER_AUTH_COOKIE_NAME):
if (not request.META.get(header_name_to_django(auth_token_settings.HEADER_NAME))
and settings.MULTIDOMAINS_OVERTAKER_AUTH_COOKIE_NAME):
ovetaker_auth_token = request.COOKIES.get(settings.MULTIDOMAINS_OVERTAKER_AUTH_COOKIE_NAME)
token = get_object_or_none(Token, key=ovetaker_auth_token, is_active=True)
if utils.get_user_from_token(token).is_authenticated():
Expand Down

0 comments on commit f8b7603

Please sign in to comment.