From 220d5db3a7cc551e4ab51c28b3ce2abdf5776520 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A3=8E=E5=90=B9=E6=88=91=E5=B7=B2=E6=95=A3?= Date: Sun, 29 May 2022 00:52:31 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=81=E8=AE=B8=E8=B7=A8=E5=9F=9F=E8=AF=B7?= =?UTF-8?q?=E6=B1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cmd/server.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cmd/server.go b/cmd/server.go index dc5360e4..3b14ba9d 100644 --- a/cmd/server.go +++ b/cmd/server.go @@ -66,6 +66,7 @@ var serverCmd = &cobra.Command{ //参数方式查询 ec.GET("/", func(c echo.Context) error { //设置响应头信息 + c.Response().Header().Add("Access-Control-Allow-Origin", "*") c.Response().Header().Add("Server", "nginx/1.22.0") ip := c.QueryParam("ip") cname := "" @@ -118,6 +119,7 @@ var serverCmd = &cobra.Command{ //路径方式查询 ec.GET("/:ip", func(c echo.Context) error { //设置响应头信息 + c.Response().Header().Add("Access-Control-Allow-Origin", "*") c.Response().Header().Add("Server", "nginx/1.22.0") ip := c.Param("ip") cname := ""