Merge pull request #152 from brikou/expose_location_header
Add 'Location' to exposed headers
This commit is contained in:
+1
-1
@@ -47,7 +47,7 @@ corsPolicy req = case lookup "origin" headers of
|
||||
, corsRequestHeaders = "Authentication":accHeaders
|
||||
, corsExposedHeaders = Just [
|
||||
"Content-Encoding", "Content-Location", "Content-Range", "Content-Type"
|
||||
, "Date", "Server", "Transfer-Encoding", "Range-Unit"
|
||||
, "Date", "Location", "Server", "Transfer-Encoding", "Range-Unit"
|
||||
]
|
||||
}
|
||||
Nothing -> Nothing
|
||||
|
||||
@@ -59,7 +59,7 @@ spec = around withApp $ describe "CORS" $ do
|
||||
liftIO $ simpleHeaders r `shouldSatisfy` matchHeader
|
||||
"Access-Control-Expose-Headers"
|
||||
"Content-Encoding, Content-Location, Content-Range, Content-Type, \
|
||||
\Date, Server, Transfer-Encoding, Range-Unit"
|
||||
\Date, Location, Server, Transfer-Encoding, Range-Unit"
|
||||
|
||||
describe "postflight request" $
|
||||
it "allows INFO body through even with CORS request headers present" $ do
|
||||
|
||||
Reference in New Issue
Block a user