99668ec0d857e31688f0c6cd81a5e5dbafb4139e
The auth rate limiter keys on c.ClientIP(), but the router was built with gin.New() and never called SetTrustedProxies — so Gin trusted all proxies by default. Behind a host reverse proxy that meant the limiter either bucketed every request under the proxy's IP, or (with the port reachable directly) could be bypassed by a forged X-Forwarded-For. NewRouter now takes a trusted-proxy list and configures SetTrustedProxies, returning an error on an invalid list so misconfiguration fails fast at startup. The list comes from a new TRUSTED_PROXIES config (CSV of CIDRs/IPs), defaulting to loopback plus the Docker bridge ranges a host proxy reaches the container through. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Description
🎋Tanabata — web file manager with tags!
5.6 MiB
Languages
Go
50%
Svelte
38.6%
TypeScript
8.8%
PLpgSQL
1.4%
Dockerfile
0.5%
Other
0.7%