mirror of
https://git.undefined-dev.fr/Blendman974/faceclaw.git
synced 2026-11-19 21:03:09 +00:00
34 lines
1.0 KiB
Plaintext
34 lines
1.0 KiB
Plaintext
# stats.faceclaw.org, installed by setup-server.sh as
|
|
# /etc/nginx/sites-available/stats.faceclaw.org. certbot then adds the TLS
|
|
# server block and the HTTP-to-HTTPS redirect to the installed copy, so
|
|
# setup-server.sh never overwrites it; make later changes on the server too.
|
|
|
|
limit_req_zone $binary_remote_addr zone=faceclaw_stats:1m rate=10r/m;
|
|
|
|
server {
|
|
listen 80;
|
|
server_name stats.faceclaw.org;
|
|
|
|
# Reports are anonymous: don't keep the IP addresses they come from.
|
|
access_log off;
|
|
limit_req_log_level notice;
|
|
client_max_body_size 64k;
|
|
|
|
location = /v1/report {
|
|
limit_req zone=faceclaw_stats burst=20 nodelay;
|
|
limit_req_status 429;
|
|
proxy_pass http://127.0.0.1:8290;
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Host $host;
|
|
}
|
|
|
|
location = /healthz {
|
|
proxy_pass http://127.0.0.1:8290;
|
|
}
|
|
|
|
location / {
|
|
default_type text/plain;
|
|
return 200 "Faceclaw's opt-in usage statistics endpoint. See https://faceclaw.org/privacy.html\n";
|
|
}
|
|
}
|