remove localhost CORS as it's not needed anymore (#637)
fixes #636 Signed-off-by: Marcos Lilljedahl <marcosnils@gmail.com>
This commit is contained in:
@@ -69,8 +69,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.Contains(origin, "localhost") ||
|
||||
strings.HasSuffix(origin, ".play-with-docker.com") ||
|
||||
if strings.HasSuffix(origin, ".play-with-docker.com") ||
|
||||
strings.HasSuffix(origin, ".play-with-kubernetes.com") ||
|
||||
strings.HasSuffix(origin, ".docker.com") ||
|
||||
strings.HasSuffix(origin, ".play-with-go.dev") {
|
||||
|
||||
Reference in New Issue
Block a user