fix(api): align upload permissions and mount robots and swagger routes

This commit is contained in:
ryan
2026-08-30 17:53:42 +08:00
parent 7c5c196ede
commit 374289bfda
10 changed files with 6718 additions and 110 deletions
+4
View File
@@ -170,6 +170,10 @@ func (p *Plugin) Apply(ctx *core.Context) error {
adminRouter := ctx.Router().Group("/api/v1/admin", loginMW, adminMW)
handler.RegisterRoutes(adminRouter)
// Register robots.txt public route
ctx.Router().GET("/robots.txt", handler.GetRobotsTXT)
ctx.Router().RegisterWhitelist("/robots.txt")
// 2. Register Background Tasks
logSwitchHandler := &service.LogDBSwitchHandler{}
ctx.Task().Register(service.LogDBSwitchTask, func(c context.Context, payload []byte) error {