From 1ed850aea243de21198d89bc8528db075f7a1294 Mon Sep 17 00:00:00 2001 From: erik Date: Tue, 16 Jan 2024 15:18:18 +0100 Subject: [PATCH] Initial rate limit middleware --- src/main/resources/forgejo/middleware-ratelimit.yaml | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 src/main/resources/forgejo/middleware-ratelimit.yaml diff --git a/src/main/resources/forgejo/middleware-ratelimit.yaml b/src/main/resources/forgejo/middleware-ratelimit.yaml new file mode 100644 index 0000000..4c614e4 --- /dev/null +++ b/src/main/resources/forgejo/middleware-ratelimit.yaml @@ -0,0 +1,10 @@ +# Here, an average of 100 requests per second is allowed. +# In addition, a burst of 50 requests is allowed. +apiVersion: traefik.io/v1alpha1 +kind: Middleware +metadata: + name: ratelimit +spec: + rateLimit: # ToDo: Config options for rate limiting: https://doc.traefik.io/traefik/middlewares/http/ratelimit/ + average: 100 + burst: 50 \ No newline at end of file