set scheme prefix dependent on approot, not incoming connection.

This commit is contained in:
nek0 2015-08-28 13:35:26 +02:00
parent bc63a44883
commit 325045cfec

View file

@ -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.