From e51ae4a2c8beae4836c1fd69deb278911052afd9 Mon Sep 17 00:00:00 2001
From: str4d <str4d@mail.i2p>
Date: Sat, 26 Oct 2013 20:45:46 +0000
Subject: [PATCH] Canonical domain should always be HTTPS

---
 i2p2www/templatevars.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/i2p2www/templatevars.py b/i2p2www/templatevars.py
index e682dd2da..383158ae4 100644
--- a/i2p2www/templatevars.py
+++ b/i2p2www/templatevars.py
@@ -45,8 +45,8 @@ def utility_processor():
 
     # Provide the canonical link to the current page
     def get_canonical_link():
-        protocol = request.url.split('//')[0]
-        return protocol + '//' + CANONICAL_DOMAIN + request.path
+        # Canonical domain should always be HTTPS
+        return 'https://' + CANONICAL_DOMAIN + request.path
 
     # Convert an I2P url to an equivalent clearnet one
     def convert_url_to_clearnet(value):
-- 
GitLab