This commit is contained in:
Marcos Lilljedahl
2018-04-30 10:23:22 -03:00
parent cf13558615
commit b363a35a61

View File

@@ -60,7 +60,7 @@ func Register(extend HandlerExtender) {
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 { 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.Contains(origin, "localhost") || if strings.Contains(origin, "localhost") ||
strings.HasSuffix(origin, "play-with-docker.com") || strings.HasSuffix(origin, "play-with-docker.com") ||
strings.HasSuffix(origin, "play-with-kuberentes.com") || strings.HasSuffix(origin, "play-with-kubernetes.com") ||
strings.HasSuffix(origin, "play-with-moby.com") { strings.HasSuffix(origin, "play-with-moby.com") {
return true return true
} }