From b0d1fe4e0acb0fa40c684069c0e9d77d7a65ace3 Mon Sep 17 00:00:00 2001 From: zhangqian <zhangqian@123.com> Date: 星期二, 17 十月 2023 15:53:53 +0800 Subject: [PATCH] fix --- middleware/user.go | 11 +++++++++++ 1 files changed, 11 insertions(+), 0 deletions(-) diff --git a/middleware/user.go b/middleware/user.go index c6df3f9..f1e4487 100644 --- a/middleware/user.go +++ b/middleware/user.go @@ -32,7 +32,18 @@ } } +var whiteList = map[string]struct{}{ //鐧藉悕鍗曞湴鍧�鍒楄〃 + "/api/code/getCodeList": {}, + "/api/data/getAllData": {}, + "/api/serviceCollectionPlan/add": {}, + "/api/bankAccount/list": {}, + "/api/paymentType/list": {}, +} + func CheckAuth(apiPath string, token string) bool { + if _, ok := whiteList[apiPath]; ok { + return true + } cli := user.NewUserServiceClient(userConn) ctx, cancel := context.WithTimeout(context.Background(), time.Second) defer cancel() -- Gitblit v1.8.0