feat: add config to specify CORS origins (#2986)

This commit is contained in:
Taimoor Zaeem
2023-10-24 09:38:25 -05:00
committed by GitHub
parent 618f93dec1
commit d94286c185
19 changed files with 134 additions and 52 deletions
+1 -2
View File
@@ -20,8 +20,7 @@ spec =
""
`shouldRespondWith`
""
{ matchHeaders = [ "Access-Control-Allow-Origin" <:> "http://example.com"
, "Access-Control-Allow-Credentials" <:> "true"
{ matchHeaders = [ "Access-Control-Allow-Origin" <:> "*"
, "Access-Control-Allow-Methods" <:> "GET, POST, PATCH, PUT, DELETE, OPTIONS, HEAD"
, "Access-Control-Allow-Headers" <:> "Authorization, Foo, Bar, Accept, Accept-Language, Content-Language"
, "Access-Control-Max-Age" <:> "86400" ]