Skip to content

Commit

Permalink
chore: echo isn't able to have a cors middleware on a group
Browse files Browse the repository at this point in the history
  • Loading branch information
sfroment committed Apr 12, 2019
1 parent c1f8027 commit 61fdf3a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ func NewServer(cfg *ServerConfig) (*Server, error) {
release.GET("/android.json", s.ListReleaseAndroidJson)
desktop := release.Group("/desktop")
// since desktop cli make request from http://localhost:XXXX we're forced to add this
desktop.Use(middleware.CORSWithConfig(middleware.CORSConfig{
e.Use(middleware.CORSWithConfig(middleware.CORSConfig{
AllowOrigins: []string{"*"},
AllowMethods: []string{http.MethodGet, http.MethodOptions, http.MethodPut, http.MethodPost, http.MethodDelete},
}))
Expand Down

0 comments on commit 61fdf3a

Please sign in to comment.