Commit a9f8a744 authored by Christopher League's avatar Christopher League 🖥

Temporary: make /version show request headers

So I can debug HTTPS termination.
parent 1d89563e
Pipeline #535 passed with stage
in 55 seconds
...@@ -29,6 +29,7 @@ import Calendar ...@@ -29,6 +29,7 @@ import Calendar
import Control.Monad.Trans.Maybe import Control.Monad.Trans.Maybe
import Data.FileEmbed (embedFile) import Data.FileEmbed (embedFile)
import qualified Data.SortedList as SL import qualified Data.SortedList as SL
import qualified Network.Wai
import Development.GitRev import Development.GitRev
import Data.Time.Zones (localTimeToUTCTZ, utcToLocalTimeTZ) import Data.Time.Zones (localTimeToUTCTZ, utcToLocalTimeTZ)
import qualified FreshCache as FC import qualified FreshCache as FC
...@@ -142,5 +143,7 @@ getRobotsR = ...@@ -142,5 +143,7 @@ getRobotsR =
return $ TypedContent typePlain $ toContent $(embedFile "config/robots.txt") return $ TypedContent typePlain $ toContent $(embedFile "config/robots.txt")
getVersionR :: Handler Text getVersionR :: Handler Text
getVersionR = getVersionR = do
return $ $(gitHash) <> if $(gitDirty) then "+" else "" req <- reqWaiRequest <$> getRequest
let hs = foldMap (\(h,v) -> tshow h <> ": " <> tshow v <> "\n") $ Network.Wai.requestHeaders req
return $ hs <> "\n" <> $(gitHash) <> if $(gitDirty) then "+" else ""
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment