diff options
| author | James Mills <prologic@shortcircuit.net.au> | 2020-03-25 07:49:41 +1000 |
|---|---|---|
| committer | James Mills <prologic@shortcircuit.net.au> | 2020-03-25 07:49:41 +1000 |
| commit | 5803bcb6fc5179c26c8b908eeb48fe923e543550 (patch) | |
| tree | 43e528324bb4432ccf426b944300c1e6f670a863 /app | |
| parent | 3d0b3044ec5a41949185f2622e33726ada29ee0b (diff) | |
Updated CORS config (again)
Diffstat (limited to 'app')
| -rw-r--r-- | app/app.go | 13 |
1 files changed, 12 insertions, 1 deletions
@@ -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(), ) |
