summaryrefslogtreecommitdiff
path: root/examples/nginx/witryna.conf
diff options
context:
space:
mode:
Diffstat (limited to 'examples/nginx/witryna.conf')
-rw-r--r--examples/nginx/witryna.conf8
1 files changed, 8 insertions, 0 deletions
diff --git a/examples/nginx/witryna.conf b/examples/nginx/witryna.conf
index 5f56ef2..0b92e52 100644
--- a/examples/nginx/witryna.conf
+++ b/examples/nginx/witryna.conf
@@ -7,6 +7,11 @@
# TLS is not configured here — use certbot or similar to add certificates:
# sudo certbot --nginx -d my-site.example.com -d witryna.example.com
+# Rate limiting: 10 requests per minute per source IP for webhook endpoints.
+# Place this directive at the http {} level (outside server blocks) or in a
+# separate file included from nginx.conf.
+limit_req_zone $binary_remote_addr zone=witryna_webhooks:10m rate=10r/m;
+
# Public site — serves your built static files
server {
listen 80;
@@ -36,6 +41,9 @@ server {
deny all;
}
+ limit_req zone=witryna_webhooks burst=5 nodelay;
+ limit_req_status 429;
+
proxy_pass http://127.0.0.1:8080;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;