Caddy: let stppriv's admin gate skip the api rate limit

stppriv's Caddy asks /api/auth/validate-admin for every request it
gates, all from its one LAN IP, which would exhaust the 30/s per-IP api
bucket on a SilverBullet page load. Requests from STPPRIV_LAN_IP to that
one path go straight to the backend. Public traffic always arrives from
cloudflared's address, so it cannot match.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
2026-11-26 13:53:41 +00:00
co-authored by Claude Opus 5.5
parent 46f06a033b
commit 65f2408ad4
5 changed files with 24 additions and 0 deletions
+1
View File
@@ -26,6 +26,7 @@ RUN set -e; \
SILVERBULLET_PUBLIC_HOST=silverbullet-public SILVERBULLET_PUBLIC_PORT=3000 \
PYTHON_HOST=python PYTHON_PORT=8000 \
RECEIPT_WEB_UPSTREAM=127.0.0.1:9 RECEIPT_WEB_TOKEN=validate \
STPPRIV_LAN_IP=192.0.2.1 \
CLOUDFLARE_DNS_API_TOKEN=validate-placeholder-token-0000000000000 \
caddy validate --config /etc/caddy/Caddyfile --adapter caddyfile; \
done; \