Add methods in CORS requests
This commit is contained in:
@@ -43,7 +43,7 @@ func Register(extend HandlerExtender) {
|
||||
r := mux.NewRouter()
|
||||
corsRouter := mux.NewRouter()
|
||||
|
||||
corsHandler := gh.CORS(gh.AllowCredentials(), gh.AllowedHeaders([]string{"x-requested-with", "content-type"}), gh.AllowedOrigins([]string{"*"}))
|
||||
corsHandler := gh.CORS(gh.AllowCredentials(), gh.AllowedHeaders([]string{"x-requested-with", "content-type"}), gh.AllowedMethods([]string{"GET", "POST", "HEAD", "DELETE"}), gh.AllowedOrigins([]string{"*"}))
|
||||
|
||||
// Specific routes
|
||||
r.HandleFunc("/ping", Ping).Methods("GET")
|
||||
|
||||
Reference in New Issue
Block a user