mirror of
https://github.com/halejohn/Cloudreve.git
synced 2026-01-26 09:34:57 +08:00
Feat: auth for remote callback / Modify: use map to store hooks in filesystem
This commit is contained in:
@@ -114,6 +114,17 @@ func InitMasterRouter() *gin.Engine {
|
||||
}
|
||||
}
|
||||
|
||||
// 回调接口
|
||||
callback := v3.Group("callback")
|
||||
{
|
||||
// 远程上传回调
|
||||
callback.POST(
|
||||
"remote/:key",
|
||||
middleware.RemoteCallbackAuth(),
|
||||
controllers.RemoteCallback,
|
||||
)
|
||||
}
|
||||
|
||||
// 需要登录保护的
|
||||
auth := v3.Group("")
|
||||
auth.Use(middleware.AuthRequired())
|
||||
|
||||
Reference in New Issue
Block a user