From 074a33dc51bd7e9ed72434223ceb06d70f1044c5 Mon Sep 17 00:00:00 2001 From: Steffen Jost Date: Wed, 8 Dec 2021 16:34:55 +0100 Subject: [PATCH] fix(status): route status exempt from approot normalisation, might not fix the issue yet --- src/Foundation/Yesod/Middleware.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Foundation/Yesod/Middleware.hs b/src/Foundation/Yesod/Middleware.hs index f0c078ec7..c39fb9256 100644 --- a/src/Foundation/Yesod/Middleware.hs +++ b/src/Foundation/Yesod/Middleware.hs @@ -137,6 +137,7 @@ yesodMiddleware = cacheControlMiddleware . storeBearerMiddleware . csrfMiddlewar case route of MetricsR -> mzero HealthR -> mzero + StatusR -> mzero InstanceR -> mzero AdminCrontabR -> mzero _other -> return () @@ -147,7 +148,7 @@ yesodMiddleware = cacheControlMiddleware . storeBearerMiddleware . csrfMiddlewar approotHost <- hoistMaybe $ approotScopeHost rApproot app let doRedirect = do url <- approotRender rApproot route - $logDebugS "normalizeApprootMiddleware" url + $logDebugS "normalizeApprootMiddleware redirect" url redirect url if | approotHost /= reqHost , rApproot /= ApprootUserGenerated