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) { ...@@ -25,9 +25,9 @@ var FilterToken = func(ctx *context.Context) {
// 地址白名单 // 地址白名单
whitelist := []string{ whitelist := []string{
"/v1/auth/login", "/api/auth/login",
"/v1/auth/logout", "/api/auth/logout",
"/v1/auth/token", "/api/auth/token",
} }
oldToken := ctx.Input.Header("Authorization") oldToken := ctx.Input.Header("Authorization")
......
...@@ -191,9 +191,6 @@ func init() { ...@@ -191,9 +191,6 @@ func init() {
// a new ns used /api // a new ns used /api
newNs := routers("/api") newNs := routers("/api")
// scrapped /v1 beego.AddNamespace(newNs)
oldNs := routers("/v1")
beego.AddNamespace(newNs, oldNs)
} }
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