diff --git a/templates/scripts/create_domain_node_compose_file.sh b/templates/scripts/create_domain_node_compose_file.sh index e04a1212..b5562d5c 100755 --- a/templates/scripts/create_domain_node_compose_file.sh +++ b/templates/scripts/create_domain_node_compose_file.sh @@ -93,10 +93,14 @@ services: - "traefik.http.routers.archival-node.tls=true" - "traefik.http.routers.archival-node.tls.certresolver=le" - "traefik.http.routers.archival-node.entrypoints=websecure" - - "traefik.http.routers.archival-node.middlewares=redirect-https" + - "traefik.http.routers.archival-node.middlewares=redirect-https,rate-limt" - "traefik.http.middlewares.redirect-https.redirectscheme.scheme=https" - "traefik.http.middlewares.redirect-https.redirectscheme.permanent=true" - "traefik.docker.network=traefik-proxy" + # Rate limiting configuration + - "traefik.http.middlewares.rate-limit.ratelimit.average=200" + - "traefik.http.middlewares.rate-limit.ratelimit.burst=300" + - "traefik.http.middlewares.rate-limit.ratelimit.period=1s" networks: - traefik-proxy logging: diff --git a/templates/scripts/create_rpc_node_compose_file.sh b/templates/scripts/create_rpc_node_compose_file.sh index ef3826d5..17bade9c 100755 --- a/templates/scripts/create_rpc_node_compose_file.sh +++ b/templates/scripts/create_rpc_node_compose_file.sh @@ -84,10 +84,14 @@ services: - "traefik.http.routers.archival-node.tls=true" - "traefik.http.routers.archival-node.tls.certresolver=le" - "traefik.http.routers.archival-node.entrypoints=websecure" - - "traefik.http.routers.archival-node.middlewares=redirect-https" + - "traefik.http.routers.archival-node.middlewares=redirect-https,rate-limt" - "traefik.http.middlewares.redirect-https.redirectscheme.scheme=https" - "traefik.http.middlewares.redirect-https.redirectscheme.permanent=true" - "traefik.docker.network=traefik-proxy" + # Rate limiting configuration + - "traefik.http.middlewares.rate-limit.ratelimit.average=200" + - "traefik.http.middlewares.rate-limit.ratelimit.burst=300" + - "traefik.http.middlewares.rate-limit.ratelimit.period=1s" ports: - "9615:9615" networks: