Removed check_secure as it precludes insecure logins over Docker.

This commit is contained in:
Adamos Kyriakou 2021-03-30 05:33:25 +03:00
parent 88e126a6bd
commit 26ffca6a7a

View file

@ -336,14 +336,7 @@ class Auth(APIMixin):
@staticmethod
def check_secure():
"""Check request, return False if using SSL or local connection."""
if this.request.is_secure():
return True # using SSL
elif this.request.META['REMOTE_ADDR'] in [
'localhost',
'127.0.0.1',
]:
return True # localhost
raise MeteorError(403, 'Authentication refused without SSL.')
return True
def get_username(self, user):
"""Retrieve username from user selector."""