mirror of
https://github.com/Buriburizaem0n/nezha_domains.git
synced 2026-11-04 16:40:21 +00:00
1 parent
061a9992ff
commit
c3dcc721dc
13 files changed
+159
-15
No files matched your search
@@ -26,6 +26,7 @@ func Authorize(opt AuthorizeOption) func(*gin.Context) {
|
||||
if opt.Guest {
|
||||
code = http.StatusBadRequest
|
||||
}
|
||||
|
||||
commonErr := ErrInfo{
|
||||
Title: "访问受限",
|
||||
Code: code,
|
||||
@@ -36,6 +37,7 @@ func Authorize(opt AuthorizeOption) func(*gin.Context) {
|
||||
|
||||
var isLogin bool
|
||||
|
||||
// 用户鉴权
|
||||
token, _ := c.Cookie(dao.Conf.Site.CookieName)
|
||||
token = strings.TrimSpace(token)
|
||||
if token != "" {
|
||||
|
||||
Reference in new issue
Block a user