forked from mirrors/pronouns.cc
fix: allow all methods in CORS
This commit is contained in:
parent
8f8daaa331
commit
5bac691d15
1 changed files with 3 additions and 2 deletions
|
@ -52,7 +52,8 @@ func New() (*Server, error) {
|
|||
// add CORS
|
||||
s.Router.Use(cors.Handler(cors.Options{
|
||||
AllowedOrigins: []string{"https://*", "http://*"},
|
||||
AllowedMethods: []string{"HEAD", "GET"},
|
||||
// Allow all methods normally used by the API
|
||||
AllowedMethods: []string{"HEAD", "GET", "POST", "PATCH", "DELETE"},
|
||||
AllowedHeaders: []string{"Accept", "Authorization", "Content-Type"},
|
||||
AllowCredentials: false,
|
||||
MaxAge: 300,
|
||||
|
|
Loading…
Reference in a new issue