Skip to content

Commit

Permalink
Add methods in CORS requests
Browse files Browse the repository at this point in the history
  • Loading branch information
marcosnils committed Oct 14, 2017
1 parent 4baa344 commit 8769aa3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion handlers/bootstrap.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit 8769aa3

Please sign in to comment.