Feat: auth for remote callback / Modify: use map to store hooks in filesystem

This commit is contained in:
HFO4
2019-12-30 19:08:38 +08:00
parent ca9f44c06c
commit d29b7ef6f8
15 changed files with 158 additions and 59 deletions

View File

@@ -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())