Merge pull request #152 from brikou/expose_location_header

Add 'Location' to exposed headers
This commit is contained in:
Joe Nelson
2015-02-18 08:41:00 -08:00
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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