feat(rate-limit): implement RATE_LIMIT_TRUSTED_PROXY for Railway deployments and update related documentation

This commit is contained in:
RainbowBird
2026-07-31 22:16:01 +08:00
parent 81b8a4d5b4
commit 2a34a52fdc
7 changed files with 136 additions and 20 deletions
+4 -1
View File
@@ -14,6 +14,10 @@ STRIPE_WEBHOOK_SECRET=""
API_SERVER_URL=""
# Trust Railway's canonical X-Real-IP only when this service is deployed behind
# Railway/Caddy and cannot be reached through an untrusted direct proxy.
# RATE_LIMIT_TRUSTED_PROXY="railway"
# Comma-separated browser origins for CORS (/api/*) and Stripe return URLs.
# Required when the Capacitor dev server uses a LAN IP (see ios/App/App/capacitor.config.json),
# e.g. ADDITIONAL_TRUSTED_ORIGINS="https://10.0.0.129:5273,https://198.18.0.1:5273"
@@ -34,4 +38,3 @@ API_SERVER_URL=""
# dropping PREVIOUS. See `apps/server/src/utils/envelope-crypto.ts`.
LLM_ROUTER_MASTER_KEY=""
# LLM_ROUTER_MASTER_KEY_PREVIOUS=""