@ -62,7 +62,7 @@ func Init(e *gin.Engine) {
|
||||
api.GET("/auth/get_sso_id", handles.SSOLoginCallback)
|
||||
api.GET("/auth/sso_get_token", handles.SSOLoginCallback)
|
||||
|
||||
//webauthn
|
||||
// webauthn
|
||||
webauthn.GET("/webauthn_begin_registration", handles.BeginAuthnRegistration)
|
||||
webauthn.POST("/webauthn_finish_registration", handles.FinishAuthnRegistration)
|
||||
webauthn.GET("/webauthn_begin_login", handles.BeginAuthnLogin)
|
||||
@ -125,6 +125,7 @@ func admin(g *gin.RouterGroup) {
|
||||
setting.POST("/reset_token", handles.ResetToken)
|
||||
setting.POST("/set_aria2", handles.SetAria2)
|
||||
setting.POST("/set_qbit", handles.SetQbittorrent)
|
||||
setting.POST("/set_transmission", handles.SetTransmission)
|
||||
|
||||
task := g.Group("/task")
|
||||
handles.SetupTaskRoute(task)
|
||||
@ -159,14 +160,15 @@ func _fs(g *gin.RouterGroup) {
|
||||
g.PUT("/put", middlewares.FsUp, handles.FsStream)
|
||||
g.PUT("/form", middlewares.FsUp, handles.FsForm)
|
||||
g.POST("/link", middlewares.AuthAdmin, handles.Link)
|
||||
//g.POST("/add_aria2", handles.AddOfflineDownload)
|
||||
//g.POST("/add_qbit", handles.AddQbittorrent)
|
||||
// g.POST("/add_aria2", handles.AddOfflineDownload)
|
||||
// g.POST("/add_qbit", handles.AddQbittorrent)
|
||||
// g.POST("/add_transmission", handles.SetTransmission)
|
||||
g.POST("/add_offline_download", handles.AddOfflineDownload)
|
||||
}
|
||||
|
||||
func Cors(r *gin.Engine) {
|
||||
config := cors.DefaultConfig()
|
||||
//config.AllowAllOrigins = true
|
||||
// config.AllowAllOrigins = true
|
||||
config.AllowOrigins = conf.Conf.Cors.AllowOrigins
|
||||
config.AllowHeaders = conf.Conf.Cors.AllowHeaders
|
||||
config.AllowMethods = conf.Conf.Cors.AllowMethods
|
||||
|
Reference in New Issue
Block a user