This commit is contained in:
Marcos Lilljedahl
2018-04-25 13:23:48 -03:00
parent 8353f5a42c
commit cf13558615

View File

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