Browse Source

提交

pull/2/head
娄文智 4 years ago
parent
commit
74219ab642
2 changed files with 7 additions and 10 deletions
  1. +7
    -3
      conf/app.go
  2. +0
    -7
      web/middleware/middleware.go

+ 7
- 3
conf/app.go View File

@ -1,8 +1,12 @@
package conf
var ExampleFile = "http://localhost:22000/public/uploadxlsx/example.xlsx"
//var ExampleFile = "http://localhost:22000/public/uploadxlsx/example.xlsx"
//
//var Baseurl = "http://localhost:22000"
var Baseurl = "http://localhost:22000"
var ExampleFile = "http://localhost:8092/public/uploadxlsx/example.xlsx"
var Baseurl = "http://localhost:8092"
type AppConf struct {
DisablePathCorrection bool
@ -32,7 +36,7 @@ var AppConfig AppConf = AppConf{
IgnoreURLs: []string{"/", "/user/login", "/user/courts", "/admin/tabnames/download", "/user/getimg"}, //免token验证路径
JWTTimeout: 72000,
LogLevel: "debug",
Secret: "123456",
Secret: "lapp_wy123456",
},
PublicRute: []string{"/sysMenu", "/user/getuserinfo", "/user/pwd", "/user/avatar", "/user/profile", "/user/getimg", "/admin/tabnames/list", "/admin/stdeftab/selectarr", "/admin/stdeftab/selectall"}, //免权限检查路径
}

+ 0
- 7
web/middleware/middleware.go View File

@ -35,13 +35,6 @@ func ServeHTTP(ctx context.Context) {
return
}
}
if !strings.Contains(path, "/sysMenu") {
// casbin权限拦截
ok := casbins.CheckPermissions(ctx)
if !ok {
return
}
}
// Pass to real API
ctx.Next()


Loading…
Cancel
Save