diff options
author | S7evinK <tfaelligen@gmail.com> | 2021-11-24 13:55:44 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-24 12:55:44 +0000 |
commit | 25dcf801806bbca4ac76060f595591881b67de32 (patch) | |
tree | 001ce48ae9d99fd9abaa5b6c619a40b09d2a2332 /setup/monolith.go | |
parent | 17227f8e98e132f45319288e03c5fce2e8da3408 (diff) |
Ratelimit requests to /media/r0/download|upload (#2020)
* Add /media/r0/config handler
Signed-off-by: Till Faelligen <tfaelligen@gmail.com>
* Add rate limiting to media api
* Rename variable
* Add passing tests
* Don't send multiple headers
Co-authored-by: Neil Alexander <neilalexander@users.noreply.github.com>
Diffstat (limited to 'setup/monolith.go')
-rw-r--r-- | setup/monolith.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/setup/monolith.go b/setup/monolith.go index b076e990..e6c95522 100644 --- a/setup/monolith.go +++ b/setup/monolith.go @@ -68,7 +68,7 @@ func (m *Monolith) AddAllPublicRoutes(process *process.ProcessContext, csMux, ss m.KeyRing, m.RoomserverAPI, m.FederationAPI, m.EDUInternalAPI, m.KeyAPI, &m.Config.MSCs, nil, ) - mediaapi.AddPublicRoutes(mediaMux, &m.Config.MediaAPI, m.UserAPI, m.Client) + mediaapi.AddPublicRoutes(mediaMux, &m.Config.MediaAPI, &m.Config.ClientAPI.RateLimiting, m.UserAPI, m.Client) syncapi.AddPublicRoutes( process, csMux, m.UserAPI, m.RoomserverAPI, m.KeyAPI, m.FedClient, &m.Config.SyncAPI, |