Add public OnlyOffice download endpoint to bypass auth middleware 401 issue
All checks were successful
Automated Container Build / build-and-push (push) Successful in 1m20s

This commit is contained in:
Elijah 2026-05-24 12:48:03 -07:00
parent a0353445d9
commit fd991a1d4b
3 changed files with 39 additions and 1 deletions

View file

@ -138,6 +138,9 @@ func main() {
// OnlyOffice callback (public but validates query token)
public.Post("/onlyoffice/callback", onlyOfficeHandler.Callback)
// OnlyOffice file download (public but validates query token — bypasses auth middleware
// since requests come from the Document Server via Next.js proxy which can drop query params)
public.Get("/onlyoffice/download", onlyOfficeHandler.DownloadForEditor)
// Auth routes (with brute force protection)
auth := app.Group("/api/auth")