From dcbf596073c2de600b5af13e86431292b1c76633 Mon Sep 17 00:00:00 2001 From: Ankit Nayan Date: Thu, 7 Jan 2021 16:28:31 +0530 Subject: [PATCH] removed cors --- pkg/query-service/app/server.go | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/pkg/query-service/app/server.go b/pkg/query-service/app/server.go index d5c294b7f3..6e38f9ab26 100644 --- a/pkg/query-service/app/server.go +++ b/pkg/query-service/app/server.go @@ -5,7 +5,6 @@ import ( "net/http" "github.com/gorilla/handlers" - "github.com/rs/cors" "github.com/soheilhy/cmux" "go.signoz.io/query-service/druidQuery" "go.signoz.io/query-service/godruid" @@ -92,14 +91,14 @@ func createHTTPServer(druidClientUrl string) *http.Server { apiHandler.RegisterRoutes(r) - c := cors.New(cors.Options{ - AllowedOrigins: []string{"http://localhost:3000"}, - // AllowCredentials: true, - // AllowedMethods: []string{"GET", "DELETE", "POST", "PUT"}, - }) + // c := cors.New(cors.Options{ + // AllowedOrigins: []string{"http://localhost:3000"}, + // // AllowCredentials: true, + // // AllowedMethods: []string{"GET", "DELETE", "POST", "PUT"}, + // }) - handler := c.Handler(r) - // var handler http.Handler = r + // handler := c.Handler(r) + var handler http.Handler = r handler = handlers.CompressHandler(handler)