fix: change cors options
This commit is contained in:
parent
ee33090b7f
commit
9d71b6d23b
1 changed files with 3 additions and 0 deletions
|
|
@ -27,6 +27,9 @@ func NewRouter() {
|
||||||
r.Use(httprate.LimitByRealIP(32, time.Minute))
|
r.Use(httprate.LimitByRealIP(32, time.Minute))
|
||||||
r.Use(cors.Handler(cors.Options{
|
r.Use(cors.Handler(cors.Options{
|
||||||
AllowedOrigins: []string{"https://axolotlmaid.com"},
|
AllowedOrigins: []string{"https://axolotlmaid.com"},
|
||||||
|
AllowedMethods: []string{"GET", "PATCH"},
|
||||||
|
AllowedHeaders: []string{"Content-Type"},
|
||||||
|
MaxAge: 300,
|
||||||
}))
|
}))
|
||||||
|
|
||||||
r.Get("/", func(w http.ResponseWriter, r *http.Request) {
|
r.Get("/", func(w http.ResponseWriter, r *http.Request) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue