Skip to content

Commit

Permalink
allow track request in readonly mode
Browse files Browse the repository at this point in the history
  • Loading branch information
hxhxhx88 committed Nov 20, 2023
1 parent 515d485 commit 43168af
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions app/action/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,15 @@ func readonlyMiddleware() echo.MiddlewareFunc {
// fine
return next(c)
}

// certain POST requests should also be allowed
if method == "POST" {
path := c.Request().URL.Path
if path == "/api/stream/track" {
return next(c)
}
}

return echo.NewHTTPError(http.StatusMethodNotAllowed)
}
}
Expand Down

0 comments on commit 43168af

Please sign in to comment.