cov: Add coverage overlay for impossible case in corsPolicy
This commit is contained in:
committed by
Wolfgang Walther
parent
826ae7459a
commit
e13d912a79
@@ -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
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
module "postgrest-9.0.0.20211220-inplace/PostgREST.Middleware" {
|
||||
inside "corsPolicy" {
|
||||
tick "[]" on line 133;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user