feat: complete remediation phase 3
Some checks failed
Automated Container Build / build-and-push (push) Failing after 15s

This commit is contained in:
Elijah 2026-05-26 14:23:50 -07:00
parent 0221e277a6
commit 6772ba8c43
10 changed files with 63 additions and 20 deletions

View file

@ -23,8 +23,17 @@ func AuthMiddleware(jwtSecret string) fiber.Handler {
isQueryToken := false
if tokenString == "" {
tokenString = c.Query("token")
isQueryToken = true
allowedPaths := []string{"/api/onlyoffice/callback", "/api/files/download", "/api/files/thumbnail"}
path := c.Path()
for _, p := range allowedPaths {
if strings.HasPrefix(path, p) {
tokenString = c.Query("token")
if tokenString != "" {
isQueryToken = true
}
break
}
}
}
if tokenString == "" {