chore: use cors middleware

This commit is contained in:
boojack 2022-07-30 14:52:37 +08:00
parent 47ffd99c3b
commit 99df4acfe9

View file

@ -32,6 +32,8 @@ func NewServer(profile *profile.Profile) *Server {
Format: "${method} ${uri} ${status}\n", Format: "${method} ${uri} ${status}\n",
})) }))
e.Use(middleware.CORS())
e.Use(middleware.TimeoutWithConfig(middleware.TimeoutConfig{ e.Use(middleware.TimeoutWithConfig(middleware.TimeoutConfig{
Skipper: middleware.DefaultSkipper, Skipper: middleware.DefaultSkipper,
ErrorMessage: "Request timeout", ErrorMessage: "Request timeout",