From e8583f7e3e4f0ba06f32fcca44766b5d1b693b8d Mon Sep 17 00:00:00 2001 From: Marcos Lilljedahl Date: Wed, 24 Jan 2018 00:49:14 -0300 Subject: [PATCH] Add wildcard to cors --- handlers/bootstrap.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handlers/bootstrap.go b/handlers/bootstrap.go index 642b9f8..bc1af60 100644 --- a/handlers/bootstrap.go +++ b/handlers/bootstrap.go @@ -56,7 +56,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.AllowedMethods([]string{"GET", "POST", "HEAD", "DELETE"}), gh.AllowedOrigins([]string{"http://training.play-with-docker.com", "http://play-with-moby.com"})) + corsHandler := gh.CORS(gh.AllowCredentials(), gh.AllowedHeaders([]string{"x-requested-with", "content-type"}), gh.AllowedMethods([]string{"GET", "POST", "HEAD", "DELETE"}), gh.AllowedOrigins([]string{"http://training.play-with-docker.com", "http://play-with-moby.com", "http://ee-labs.play-with-docker.com", "*"})) // Specific routes r.HandleFunc("/ping", Ping).Methods("GET")