cov: Add coverage overlay for impossible case in corsPolicy

This commit is contained in:
Wolfgang Walther
2022-06-03 22:19:16 -05:00
committed by Steve Chavez
parent ce578ec1b8
commit 747b0234ae
2 changed files with 7 additions and 0 deletions
+2
View File
@@ -128,6 +128,8 @@ corsPolicy req = case lookup "origin" headers of
headers = Wai.requestHeaders req
accHeaders = case lookup "access-control-request-headers" headers of
Just hdrs -> map (CI.mk . BS.strip) $ BS.split ',' hdrs
-- Impossible case, Middleware.Cors will not evaluate this when
-- the Access-Control-Request-Headers header is not set.
Nothing -> []
-- | Set a transaction to eventually roll back if requested and set respective
+5
View File
@@ -0,0 +1,5 @@
module "postgrest-9.0.0.20211220-inplace/PostgREST.Middleware" {
inside "corsPolicy" {
tick "[]" on line 133;
}
}