diff --git a/.env.sample b/.env.sample index c298f87..31a83cb 100644 --- a/.env.sample +++ b/.env.sample @@ -13,6 +13,9 @@ ENABLE_RESERVATIONS=false ENABLE_BACKUPS=true TZ=UTC LOG_LEVEL=info +VISITOR_REQUEST_LIMIT_BURST=60 +VISITOR_REQUEST_LIMIT_REPLENISH=5s +VISITOR_REQUEST_LIMIT_EXEMPT_HOSTS="" COMPOSE_FILE=compose.yml #SMTP_ENABLED=1 diff --git a/abra.sh b/abra.sh index 250a98d..f2fd358 100644 --- a/abra.sh +++ b/abra.sh @@ -1 +1 @@ -export SERVER_YML_VERSION=v1 +export SERVER_YML_VERSION=v2 diff --git a/server.yml.tmpl b/server.yml.tmpl index 6c28e7f..2894bce 100644 --- a/server.yml.tmpl +++ b/server.yml.tmpl @@ -280,9 +280,9 @@ visitor-subscription-limit: 30 # exempt from request rate limiting. Hostnames are resolved at the time the server is started. # Example: "1.2.3.4,ntfy.example.com,8.7.6.0/24" # -visitor-request-limit-burst: 60 -visitor-request-limit-replenish: "5s" -# visitor-request-limit-exempt-hosts: "" +visitor-request-limit-burst: {{ env "VISITOR_REQUEST_LIMIT_BURST" }} +visitor-request-limit-replenish: "{{ env "VISITOR_REQUEST_LIMIT_REPLENISH" }}" +visitor-request-limit-exempt-hosts: "{{ env "VISITOR_REQUEST_LIMIT_EXEMPT_HOSTS" }}" # Rate limiting: Hard daily limit of messages per visitor and day. The limit is reset # every day at midnight UTC. If the limit is not set (or set to zero), the request