From 0414f4933c790249dcb6e136a25b24faf577da39 Mon Sep 17 00:00:00 2001 From: Marcos Lilljedahl Date: Mon, 19 Feb 2018 01:04:23 -0300 Subject: [PATCH] Fix CORS origin --- handlers/bootstrap.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handlers/bootstrap.go b/handlers/bootstrap.go index 1b4c0f3..56a7593 100644 --- a/handlers/bootstrap.go +++ b/handlers/bootstrap.go @@ -58,7 +58,7 @@ func Register(extend HandlerExtender) { corsRouter := mux.NewRouter() corsHandler := gh.CORS(gh.AllowCredentials(), gh.AllowedHeaders([]string{"x-requested-with", "content-type"}), gh.AllowedMethods([]string{"GET", "POST", "HEAD", "DELETE"}), gh.AllowedOriginValidator(func(origin string) bool { - if strings.HasSuffix(origin, "play-with-docker.com") || strings.HasSuffix("play-with-moby.com") { + if strings.HasSuffix(origin, "play-with-docker.com") || strings.HasSuffix(origin, "play-with-moby.com") { return true } return false