mirror of
https://github.com/zeromicro/go-zero.git
synced 2026-05-07 15:10:01 +08:00
support cors in rest server
This commit is contained in:
@@ -56,7 +56,7 @@ func main() {
|
||||
Port: *port,
|
||||
Timeout: *timeout,
|
||||
MaxConns: 500,
|
||||
})
|
||||
}, rest.WithNotAllowedHandler(rest.CorsHandler()))
|
||||
defer engine.Stop()
|
||||
|
||||
engine.Use(first)
|
||||
|
||||
Reference in New Issue
Block a user