reatelimit

This commit is contained in:
Michael Grote 2024-11-10 17:34:10 +01:00
parent d3c4c7402f
commit 8194e4bd98
2 changed files with 4 additions and 4 deletions

View file

@ -38,7 +38,7 @@ services:
traefik.http.routers.registry.entrypoints: entry_https
traefik.http.services.registry.loadbalancer.server.port: 5000
traefik.http.routers.registry.middlewares: registry-ipallowlist
traefik.http.routers.registry.middlewares: registry-ipallowlist,ratelimit40
traefik.http.middlewares.registry-ipallowlist.ipallowlist.sourcerange: 192.168.2.0/24,10.25.25.0/24,192.168.48.0/24,172.18.0.0/16 # .48. ist Docker
traefik.http.middlewares.registry-ipallowlist.ipallowlist.ipstrategy.depth: 0 # https://doc.traefik.io/traefik/middlewares/http/ipallowlist/#ipstrategydepth
@ -92,7 +92,7 @@ services:
retries: 3
labels:
traefik.http.routers.registry-ui.rule: Host(`rui.mgrote.net`)
traefik.http.routers.registry-ui.middlewares: authelia,registry-ui-ipallowlist # also entferne den Prefix danach wieder
traefik.http.routers.registry-ui.middlewares: authelia,registry-ui-ipallowlist,ratelimit40
traefik.enable: true
traefik.http.routers.registry-ui.tls: true
traefik.http.routers.registry-ui.tls.certresolver: resolver_letsencrypt

View file

@ -6,7 +6,7 @@ http:
rule: "Host(`git.mgrote.net`)"
service: "service_forgejo"
middlewares:
- "ratelimit"
- "ratelimit40"
entrypoints:
- entry_https
tls:
@ -19,7 +19,7 @@ http:
- url: "http://forgejo.mgrote.net:3000/"
###### middlewares #####
middlewares:
ratelimit:
ratelimit40:
rateLimit:
average: 40
burst: 80