Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
杨树贤
/
kefu_server
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
58dd4262
authored
May 24, 2020
by
chenxianqi
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
update FilterToken whitelist
parent
505c5d82
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
7 deletions
filters/index.go
routers/router.go
filters/index.go
View file @
58dd4262
...
...
@@ -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"
)
...
...
routers/router.go
View file @
58dd4262
...
...
@@ -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
)
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment