diff --git a/README.adoc b/README.adoc index 2c920e8..f3c5897 100644 --- a/README.adoc +++ b/README.adoc @@ -36,6 +36,8 @@ fastcgi_cache_path /var/cache/nginx/fediblock levels=1:2 max_size=100m fastcgi_cache_key "$scheme$request_method$host$request_uri"; add_header X-Cache $upstream_cache_status; +limit_req_zone $binary_remote_addr zone=fediblock_add:10m rate=1r/m; + server { # […] @@ -50,6 +52,9 @@ server { fastcgi_pass unix:/var/run/cgi-fcgiwrap.socket-1; fastcgi_param SCRIPT_FILENAME /usr/bin/fediblock-backend; fastcgi_param HOME "/var/lib/nginx"; # When I didn't set it, HOME was /root. + + client_max_body_size 5M; + limit_req zone=fediblock_add; } location /rss { @@ -61,6 +66,16 @@ server { fastcgi_cache_valid 200 15m; # Cache answers for up to 15 minutes. fastcgi_cache_lock on; # Relay only one identical request at a time. } + + location /api/v1/list { + include /etc/nginx/fastcgi_params; + fastcgi_pass unix:/var/run/cgi-fcgiwrap.socket-1; + fastcgi_param SCRIPT_FILENAME /usr/bin/fediblock-backend-json_api; + fastcgi_param HOME "/var/lib/nginx"; + fastcgi_cache fediblock; + fastcgi_cache_valid 200 15m; # Cache answers for up to 15 minutes. + fastcgi_cache_lock on; # Relay only one identical request at a time. + } } --------------------------------------------------------------------------------