From 5685fffd8669892b26c28e2b122480502309513e Mon Sep 17 00:00:00 2001 From: Astro Date: Sat, 6 Mar 2021 01:42:48 +0100 Subject: [PATCH] Foundation: fix schema in approotRequest --- Foundation.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Foundation.hs b/Foundation.hs index b1d6123..ea7ee57 100644 --- a/Foundation.hs +++ b/Foundation.hs @@ -26,6 +26,7 @@ import Yesod.Auth.Hardcoded import Yesod.Auth.Message import qualified Data.Text as T import Network.Wai as Wai +import Network.Wai.Request (appearsSecure) import Data.List (tail) import Data.List.Split import Text.Printf @@ -96,7 +97,7 @@ approotRequest master req = Nothing -> appRoot $ appSettings master where prefix = - if isSecure req + if appearsSecure req then "https://" else "http://"