Commit 58dd4262 by chenxianqi

update FilterToken whitelist

parent 505c5d82
Showing with 4 additions and 7 deletions
......@@ -25,9 +25,9 @@ var FilterToken = func(ctx *context.Context) {
// 地址白名单
whitelist := []string{
"/v1/auth/login",
"/v1/auth/logout",
"/v1/auth/token",
"/api/auth/login",
"/api/auth/logout",
"/api/auth/token",
}
oldToken := ctx.Input.Header("Authorization")
......
......@@ -191,9 +191,6 @@ func init() {
// a new ns used /api
newNs := routers("/api")
// scrapped /v1
oldNs := routers("/v1")
beego.AddNamespace(newNs, oldNs)
beego.AddNamespace(newNs)
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment