From ab8122ed70aad457ea2a887e692512325859b27f Mon Sep 17 00:00:00 2001 From: zhangbiao Date: Wed, 1 Apr 2020 17:17:21 +0800 Subject: [PATCH] update README.md --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 4d6c875..c020a07 100644 --- a/README.md +++ b/README.md @@ -73,9 +73,9 @@ func Login(r *ghttp.Request) (string, interface{}) { #### 路径拦截规则 ```go - AuthPaths: g.SliceStr{"/user", "/system"}, // 这里是按照前缀拦截,拦截/user /user/list /user/add ... - AuthExcludePaths: g.SliceStr{"/user/info", "/system/user/*"}, // 不拦截路径 /user/info,/system/user/info,/system/user, - GlobalMiddleware: true, // 开启全局拦截,默认关闭 + AuthPaths: g.SliceStr{"/user", "/system"}, // 这里是按照前缀拦截,拦截/user /user/list /user/add ... + AuthExcludePaths: g.SliceStr{"/user/info", "/system/user/*"}, // 不拦截路径 /user/info,/system/user/info,/system/user, + GlobalMiddleware: true, // 开启全局拦截,默认关闭 ``` 1. `GlobalMiddleware:true`全局拦截的是通过GF的`BindMiddleware`方法创建拦截`/*`