diff --git a/go.mod b/go.mod index 57ae0ef48..28e4d873f 100644 --- a/go.mod +++ b/go.mod @@ -16,7 +16,7 @@ require ( github.com/fatih/camelcase v0.0.0-20160318181535-f6a740d52f96 // indirect github.com/fatih/structs v1.0.0 // indirect github.com/go-chi/chi v4.1.0+incompatible - github.com/go-chi/cors v1.0.1 + github.com/go-chi/cors v1.1.1 github.com/go-chi/jwtauth v4.0.4+incompatible github.com/go-sql-driver/mysql v1.5.0 // indirect github.com/golang/protobuf v1.3.1 // indirect diff --git a/go.sum b/go.sum index 6657bbde8..a22f18d17 100644 --- a/go.sum +++ b/go.sum @@ -45,8 +45,8 @@ github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/go-chi/chi v4.1.0+incompatible h1:ETj3cggsVIY2Xao5ExCu6YhEh5MD6JTfcBzS37R260w= github.com/go-chi/chi v4.1.0+incompatible/go.mod h1:eB3wogJHnLi3x/kFX2A+IbTBlXxmMeXJVKy9tTv1XzQ= -github.com/go-chi/cors v1.0.1 h1:56TT/uWGoLWZpnMI/AwAmCneikXr5eLsiIq27wrKecw= -github.com/go-chi/cors v1.0.1/go.mod h1:K2Yje0VW/SJzxiyMYu6iPQYa7hMjQX2i/F491VChg1I= +github.com/go-chi/cors v1.1.1 h1:eHuqxsIw89iXcWnWUN8R72JMibABJTN/4IOYI5WERvw= +github.com/go-chi/cors v1.1.1/go.mod h1:K2Yje0VW/SJzxiyMYu6iPQYa7hMjQX2i/F491VChg1I= github.com/go-chi/jwtauth v4.0.4+incompatible h1:LGIxg6YfvSBzxU2BljXbrzVc1fMlgqSKBQgKOGAVtPY= github.com/go-chi/jwtauth v4.0.4+incompatible/go.mod h1:Q5EIArY/QnD6BdS+IyDw7B2m6iNbnPxtfd6/BcmtWbs= github.com/go-redis/redis v6.14.2+incompatible/go.mod h1:NAIEuMOZ/fxfXJIrKDQDz8wamY7mA7PouImQ2Jvg6kA= diff --git a/server/server.go b/server/server.go index 1fe7f7a14..6b7e5f9c1 100644 --- a/server/server.go +++ b/server/server.go @@ -54,7 +54,7 @@ func (a *Server) Run(addr string) { func (a *Server) initRoutes() { r := chi.NewRouter() - r.Use(cors.Default().Handler) + r.Use(cors.AllowAll().Handler) r.Use(middleware.RequestID) r.Use(middleware.RealIP) r.Use(middleware.Recoverer)