From 781aabad97bd5552eb00d9f2b36137b0c166fe62 Mon Sep 17 00:00:00 2001 From: Nick Smith Date: Fri, 27 Jun 2014 11:18:11 +0100 Subject: [PATCH] Update Site.find_for_request to respect https --- wagtail/wagtailcore/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wagtail/wagtailcore/models.py b/wagtail/wagtailcore/models.py index 4bf818fb0..59742ffb7 100644 --- a/wagtail/wagtailcore/models.py +++ b/wagtail/wagtailcore/models.py @@ -53,7 +53,7 @@ class Site(models.Model): hostname, port = request.META['HTTP_HOST'].split(':') except ValueError: hostname = request.META['HTTP_HOST'] - port = '80' # FIXME do we want this default? + port = '443' if request.is_secure() else '80' except KeyError: # explicit routing straight to the final except clause raise