File tree Expand file tree Collapse file tree 3 files changed +1
-7
lines changed
Expand file tree Collapse file tree 3 files changed +1
-7
lines changed Original file line number Diff line number Diff line change @@ -21,7 +21,6 @@ import (
2121 esStore "github.com/odpf/columbus/store/elasticsearch"
2222 "github.com/odpf/columbus/store/postgres"
2323 "github.com/odpf/columbus/tag"
24- "github.com/rs/cors"
2524 "github.com/sirupsen/logrus"
2625 "gorm.io/gorm"
2726)
@@ -44,12 +43,10 @@ func Serve() {
4443 newRelicMonitor := initNewRelicMonitor (config )
4544 statsdMonitor := initStatsdMonitor (config )
4645 router := initRouter (esClient , newRelicMonitor , statsdMonitor , rootLogger )
47- c := cors .Default ()
48- handler := c .Handler (router )
4946
5047 serverAddr := fmt .Sprintf ("%s:%s" , config .ServerHost , config .ServerPort )
5148 log .Printf ("starting http server on %s" , serverAddr )
52- if err := http .ListenAndServe (serverAddr , handler ); err != nil {
49+ if err := http .ListenAndServe (serverAddr , router ); err != nil {
5350 log .Errorf ("listen and serve: %v" , err )
5451 }
5552}
Original file line number Diff line number Diff line change @@ -23,7 +23,6 @@ require (
2323 github.com/odpf/salt v0.0.0-20211028100023-de463ef825e1
2424 github.com/olivere/elastic/v7 v7.0.12
2525 github.com/pkg/errors v0.9.1
26- github.com/rs/cors v1.8.2
2726 github.com/sirupsen/logrus v1.8.1
2827 github.com/spf13/cobra v1.2.1
2928 github.com/spf13/viper v1.8.1
Original file line number Diff line number Diff line change @@ -419,8 +419,6 @@ github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFR
419419github.com/rogpeppe/go-internal v1.6.1 /go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc =
420420github.com/rogpeppe/go-internal v1.8.0 h1:FCbCCtXNOY3UtUuHUYaghJg4y7Fd14rXifAYUAtL9R8 =
421421github.com/rogpeppe/go-internal v1.8.0 /go.mod h1:WmiCO8CzOY8rg0OYDC4/i/2WRWAB6poM+XZ2dLUbcbE =
422- github.com/rs/cors v1.8.2 h1:KCooALfAYGs415Cwu5ABvv9n9509fSiG5SQJn/AQo4U =
423- github.com/rs/cors v1.8.2 /go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU =
424422github.com/rs/xid v1.2.1 /go.mod h1:+uKXf+4Djp6Md1KODXJxgGQPKngRmWyn10oCKFzNHOQ =
425423github.com/rs/zerolog v1.13.0 /go.mod h1:YbFCdg8HfsridGWAh22vktObvhZbQsZXe4/zB0OKkWU =
426424github.com/rs/zerolog v1.15.0 /go.mod h1:xYTKnLHcpfU2225ny5qZjxnj9NvkumZYjJHlAThCjNc =
You can’t perform that action at this time.
0 commit comments