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 /cmd/dendrite-polylith-multi | |
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 'cmd/dendrite-polylith-multi')
-rw-r--r-- | cmd/dendrite-polylith-multi/personalities/mediaapi.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cmd/dendrite-polylith-multi/personalities/mediaapi.go b/cmd/dendrite-polylith-multi/personalities/mediaapi.go index 00a2d56a..fa9d36a3 100644 --- a/cmd/dendrite-polylith-multi/personalities/mediaapi.go +++ b/cmd/dendrite-polylith-multi/personalities/mediaapi.go @@ -24,7 +24,7 @@ func MediaAPI(base *basepkg.BaseDendrite, cfg *config.Dendrite) { userAPI := base.UserAPIClient() client := base.CreateClient() - mediaapi.AddPublicRoutes(base.PublicMediaAPIMux, &base.Cfg.MediaAPI, userAPI, client) + mediaapi.AddPublicRoutes(base.PublicMediaAPIMux, &base.Cfg.MediaAPI, &base.Cfg.ClientAPI.RateLimiting, userAPI, client) base.SetupAndServeHTTP( base.Cfg.MediaAPI.InternalAPI.Listen, |