mirror of
https://github.com/Buriburizaem0n/nezha_domains.git
synced 2026-11-04 16:40:21 +00:00
feat: option to force authorization for vistor routes (#971)
This commit is contained in:
1 parent
66b16e04b6
commit
ec6b9b9b43
3 files changed
+13
-8
No files matched your search
@@ -148,7 +148,7 @@ func refreshResponse(c *gin.Context, code int, token string, expire time.Time) {
|
||||
})
|
||||
}
|
||||
|
||||
func optionalAuthMiddleware(mw *jwt.GinJWTMiddleware) func(c *gin.Context) {
|
||||
func fallbackAuthMiddleware(mw *jwt.GinJWTMiddleware) func(c *gin.Context) {
|
||||
return func(c *gin.Context) {
|
||||
claims, err := mw.GetClaimsFromJWT(c)
|
||||
if err != nil {
|
||||
|
||||
Reference in new issue
Block a user