Files
napoleond__clawdirect/render.yaml
David Noël-Romas 4f2a07c9b7 Fix rate limiting: add TRUST_PROXY_COUNT and disable turtle's default limiter
Behind Render + Cloudflare (2 proxies), req.ip resolves to Cloudflare
edge IPs, not real client IPs. This causes turtle's built-in 60/min
per-IP rate limiter to unfairly throttle all clients sharing an edge.

Also set trust proxy on the main Express app so req.ip resolves
correctly for API routes.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 20:43:34 -06:00

28 lines
682 B
YAML

services:
- type: web
name: clawdirect
runtime: node
region: oregon
plan: starter
buildCommand: |
npm install --include=dev &&
cd frontend && npm install --include=dev && cd .. &&
npm run build
preDeployCommand: npm run seed
startCommand: npm start
envVars:
- key: NODE_ENV
value: production
- key: PORT
value: 10000
- key: FUNDING_DESTINATION_ATXP
sync: false # Set manually in Render dashboard
- key: DB_PATH
value: /var/data/clawdirect.db
- key: TRUST_PROXY_COUNT
value: "2"
disk:
name: clawdirect-data
mountPath: /var/data
sizeGB: 1