From 325045cfec8cd5228689735cd32052a526ba564e Mon Sep 17 00:00:00 2001 From: nek0 Date: Fri, 28 Aug 2015 13:35:26 +0200 Subject: [PATCH] set scheme prefix dependent on approot, not incoming connection. --- Foundation.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Foundation.hs b/Foundation.hs index 49c0c2d..28faa47 100644 --- a/Foundation.hs +++ b/Foundation.hs @@ -124,9 +124,9 @@ approotRequest master req = Nothing -> appRoot $ appSettings master where prefix = - case isSecure req of + case "https://" `T.isPrefixOf` (appRoot $ appSettings master) of True -> "https://" - False -> (fst $ breakOn ":" $ appRoot $ appSettings master) `T.append` "://" + False -> "http://" -- Please see the documentation for the Yesod typeclass. There are a number -- of settings which can be configured by overriding methods here.