Middleware & Security
All API requests pass through functions/api/_middleware.js which enforces authentication, CSRF protection, and rate limiting.
Authentication
Section titled “Authentication”CSRF Protection
Section titled “CSRF Protection”All mutating requests (POST/PUT/PATCH/DELETE) require a valid Origin or Referer header matching allowed origins:
https://dashboard.fjzippin.comhttp://localhost(development only)
Rate Limiting
Section titled “Rate Limiting”| Endpoint Category | Limit | Window |
|---|---|---|
Admin endpoints (/api/access, /api/setup) | 30 req | 1 min |
AI endpoints (/api/langflow, /api/messages) | 10 req | 1 min |
| All other endpoints | 200 req | 1 min |