Config: apply CorsResourcePolicy to PUT requests

PUT requests are part of the public upsert API, so if postgrest
runs at a different origin, these requests will fail because they
don't pass CORS.
This commit is contained in:
Kyle Russell
2018-10-21 13:30:52 -05:00
committed by Steve Chávez
parent 5bfb68b982
commit 2da6bd6d1c
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -82,7 +82,7 @@ data AppConfig = AppConfig {
defaultCorsPolicy :: CorsResourcePolicy
defaultCorsPolicy = CorsResourcePolicy Nothing
["GET", "POST", "PATCH", "DELETE", "OPTIONS"] ["Authorization"] Nothing
["GET", "POST", "PATCH", "PUT", "DELETE", "OPTIONS"] ["Authorization"] Nothing
(Just $ 60*60*24) False False True
-- | CORS policy to be used in by Wai Cors middleware