summaryrefslogtreecommitdiff
path: root/app/app.go
diff options
context:
space:
mode:
authorJames Mills <prologic@shortcircuit.net.au>2020-03-25 07:49:41 +1000
committerJames Mills <prologic@shortcircuit.net.au>2020-03-25 07:49:41 +1000
commit5803bcb6fc5179c26c8b908eeb48fe923e543550 (patch)
tree43e528324bb4432ccf426b944300c1e6f670a863 /app/app.go
parent3d0b3044ec5a41949185f2622e33726ada29ee0b (diff)
Updated CORS config (again)
Diffstat (limited to 'app/app.go')
-rw-r--r--app/app.go13
1 files changed, 12 insertions, 1 deletions
diff --git a/app/app.go b/app/app.go
index f6f1c4d..278d9ff 100644
--- a/app/app.go
+++ b/app/app.go
@@ -93,7 +93,18 @@ func NewApp(cfg *Config) (*App, error) {
r.PathPrefix("/static/").Handler(fsHandler).Methods("GET")
cors := handlers.CORS(
- handlers.AllowedHeaders([]string{"content-type"}),
+ handlers.AllowedHeaders([]string{
+ "X-Requested-With",
+ "Content-Type",
+ "Authorization",
+ }),
+ handlers.AllowedMethods([]string{
+ "GET",
+ "POST",
+ "PUT",
+ "HEAD",
+ "OPTIONS",
+ }),
handlers.AllowedOrigins([]string{"*"}),
handlers.AllowCredentials(),
)