api allows private networking

This commit is contained in:
汪航洋
2023-11-29 14:46:28 +08:00
committed by ginuerzh
parent 9be710dc19
commit 6ea815eb36
3 changed files with 49 additions and 13 deletions

View File

@ -60,6 +60,7 @@ func NewService(addr string, opts ...Option) (service.Service, error) {
AllowAllOrigins: true,
AllowMethods: []string{"GET", "POST", "PUT", "DELETE", "OPTIONS"},
AllowHeaders: []string{"*"},
AllowPrivateNetwork: true,
})),
gin.Recovery(),
)