From 6d239df411acad49d45e984b2965c70bc658e936 Mon Sep 17 00:00:00 2001 From: chengka Date: Mon, 24 Feb 2020 19:47:24 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=B7=A8=E5=9F=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- middleware/cors.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/middleware/cors.go b/middleware/cors.go index bd22aa0..cb2f54f 100644 --- a/middleware/cors.go +++ b/middleware/cors.go @@ -21,7 +21,7 @@ func Cors() gin.HandlerFunc { if regexp.MustCompile(`^http://127\.0\.0\.1:\d+$`).MatchString(origin) { return true } - if regexp.MustCompile(`^http://localhost\.0\.0\.1:\d+$`).MatchString(origin) { + if regexp.MustCompile(`^http://localhost:\d+$`).MatchString(origin) { return true } return false