Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
else:
hostname = "accounts.ipfire.org"
- url = "http://%s/avatar/%s.jpg" % (hostname, self.uid)
+ url = "https://%s/avatar/%s.jpg" % (hostname, self.uid)
if size:
url += "?size=%s" % size
gravatar_email = "nobody@ipfire.org"
# construct the url
- gravatar_url = "http://www.gravatar.com/avatar/" + \
+ gravatar_url = "https://www.gravatar.com/avatar/" + \
hashlib.md5(gravatar_email).hexdigest() + "?"
gravatar_url += urllib.urlencode({'d': "mm", 's': str(size)})
@property
def url(self):
- return "http://planet.ipfire.org/post/%s" % self.slug
+ return "https://planet.ipfire.org/post/%s" % self.slug
def set_published(self, published):
if self.published == published:
else:
avatar = account.get_gravatar_url(size)
- if avatar.startswith("http://"):
+ if avatar.startswith("http://") or avatar.startswith("https://"):
return self.redirect(avatar)
self.set_header("Cache-Control", "public,max-age=300")