Updated CORS config (again)
This commit is contained in:
parent
3d0b3044ec
commit
5803bcb6fc
1 changed files with 12 additions and 1 deletions
13
app/app.go
13
app/app.go
|
@ -93,7 +93,18 @@ func NewApp(cfg *Config) (*App, error) {
|
||||||
r.PathPrefix("/static/").Handler(fsHandler).Methods("GET")
|
r.PathPrefix("/static/").Handler(fsHandler).Methods("GET")
|
||||||
|
|
||||||
cors := handlers.CORS(
|
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.AllowedOrigins([]string{"*"}),
|
||||||
handlers.AllowCredentials(),
|
handlers.AllowCredentials(),
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in a new issue