Force loading gravatar over https

This commit is contained in:
Khanh Ngo 2016-07-14 00:05:55 +07:00
parent ee033f2198
commit e7a4fb5e6a
2 changed files with 1 additions and 5 deletions

View File

@ -150,5 +150,4 @@ def pdns_api_extended_uri(version):
def email_to_gravatar_url(email, size=100):
hash_string = hashlib.md5(email).hexdigest()
schema = 'https' if app.config['SSL'] else 'http'
return "%s://s.gravatar.com/avatar/%s?s=%s" % (schema, hash_string, size)
return "https://s.gravatar.com/avatar/%s?s=%s" % (hash_string, size)

View File

@ -69,9 +69,6 @@ def before_request():
g.user = current_user
login_manager.anonymous_user = Anonymous
# set website SSL status
app.config['SSL'] = True if request.is_secure else False
@login_manager.user_loader
def load_user(id):