Un-ratelimit calls to /thumbnail
MODIFY
mediaapi/routing/routing.go
mediaapi/routing/routing.go
@@ -120,6 +120,8 @@ func makeDownloadAPI(
w.Header().Set("Content-Type", "application/json")
// Ratelimit requests
+ // NOTSPEC: The spec says everything at /media/ should be rate limited, but this causes issues with thumbnails (#2243)
+ if name != "thumbnail" {
if r := rateLimits.Limit(req); r != nil {
if err := json.NewEncoder(w).Encode(r); err != nil {
w.WriteHeader(http.StatusInternalServerError)
@@ -128,6 +130,7 @@ func makeDownloadAPI(
w.WriteHeader(http.StatusTooManyRequests)
return
}
+ }
vars, _ := httputil.URLDecodeMapValues(mux.Vars(req))
serverName := gomatrixserverlib.ServerName(vars["serverName"])

Un-ratelimit calls to /thumbnail (#2251)