From e915b5cb85392f73b536b098de882723e7a38612 Mon Sep 17 00:00:00 2001 From: snowykami Date: Wed, 2 Oct 2024 23:19:06 +0800 Subject: [PATCH] =?UTF-8?q?:bug:=20=E6=B7=BB=E5=8A=A0=E6=9E=84=E5=BB=BA?= =?UTF-8?q?=E5=B7=A5=E4=BD=9C=E6=B5=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/router.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/api/router.go b/api/router.go index 1be395c..bb347de 100644 --- a/api/router.go +++ b/api/router.go @@ -21,7 +21,8 @@ func init() { if port == "" { port = "8888" } - h = hertz.NewHertz([]config.Option{server.WithHostPorts("0.0.0.0:" + port)}, []app.HandlerFunc{}) + + h = hertz.NewHertz([]config.Option{server.WithHostPorts(":" + port)}, []app.HandlerFunc{}) // cv api 状态客户端接口 h.Use(cors.Default())