|
@@ -206,7 +206,12 @@ func (c *BaseAuthController) Prepare() {
|
|
|
uris := strings.Split(uri,"?")
|
|
|
uri = uris[0]
|
|
|
fmt.Println("uri:",uri)
|
|
|
- if !strings.Contains(api,uri) {
|
|
|
+ apis := strings.Split(api, "&")
|
|
|
+ apiMap := make(map[string]bool, 0)
|
|
|
+ for _, s := range apis {
|
|
|
+ apiMap[s] = true
|
|
|
+ }
|
|
|
+ if!apiMap[uri] {
|
|
|
c.JSON(models.BaseResponse{Ret: 403, Msg: "无权访问!", ErrMsg: "无权访问!"}, false, false)
|
|
|
c.StopRun()
|
|
|
return
|