feat: complete remediation phase 3
Some checks failed
Automated Container Build / build-and-push (push) Failing after 15s
Some checks failed
Automated Container Build / build-and-push (push) Failing after 15s
This commit is contained in:
parent
0221e277a6
commit
6772ba8c43
10 changed files with 63 additions and 20 deletions
|
|
@ -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 == "" {
|
||||
|
|
|
|||
Reference in a new issue