feat: implement server-timing-enabled config parameter (#3064)

This commit is contained in:
Andrei Dziahel
2023-11-22 17:57:50 -05:00
committed by GitHub
parent abcb21c69a
commit c3301a1653
18 changed files with 26 additions and 8 deletions
+1 -1
View File
@@ -109,7 +109,7 @@ middleware appState app req respond = do
-- If DbPlanEnabled -> calculate JWT validation time
-- If JwtCacheMaxLifetime -> cache JWT validation result
req' <- case (configDbPlanEnabled conf, configJwtCacheMaxLifetime conf) of
req' <- case (configServerTimingEnabled conf, configJwtCacheMaxLifetime conf) of
(True, 0) -> do
(dur, authResult) <- timeItT parseJwt
return $ req { Wai.vault = Wai.vault req & Vault.insert authResultKey authResult & Vault.insert jwtDurKey dur }