mirror of
https://github.com/HChaZZY/alist.git
synced 2025-12-22 10:06:28 +08:00
feat: user jwt login
This commit is contained in:
@@ -1,12 +1,19 @@
|
||||
package server
|
||||
|
||||
import (
|
||||
"github.com/alist-org/alist/v3/internal/conf"
|
||||
"github.com/alist-org/alist/v3/internal/server/common"
|
||||
"github.com/alist-org/alist/v3/internal/server/controllers"
|
||||
"github.com/gin-contrib/cors"
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
func Init(r *gin.Engine) {
|
||||
common.SecretKey = []byte(conf.Conf.JwtSecret)
|
||||
Cors(r)
|
||||
|
||||
api := r.Group("/api")
|
||||
api.POST("/user/login", controllers.Login)
|
||||
}
|
||||
|
||||
func Cors(r *gin.Engine) {
|
||||
|
||||
Reference in New Issue
Block a user