feat: Add RBAC to /files endpoints (#1664)

* feat: Add RBAC to /files endpoints
This commit is contained in:
Steven Masley
2022-05-24 08:25:02 -05:00
committed by GitHub
parent f763472609
commit 5f8d0e5dad
4 changed files with 25 additions and 6 deletions

View File

@ -134,6 +134,7 @@ func newRouter(options *Options, a *api) chi.Router {
r.Route("/files", func(r chi.Router) {
r.Use(
apiKeyMiddleware,
authRolesMiddleware,
// This number is arbitrary, but reading/writing
// file content is expensive so it should be small.
httpmw.RateLimitPerMinute(12),