Files
core/src
hykocx 8209503395 feat(api): add CSRF protection and rate limiting to routers
- Add `passesCsrfCheck()` to both `router.js` and `dynamic-router.js`
  to block cross-site request forgery on state-mutating methods
  (POST/PUT/PATCH/DELETE) by validating Origin/Referer headers against
  `ZEN_APP_URL`
- Apply global IP-based rate limiting in `dynamic-router.js` mirroring
  the policy already present in `router.js`; exempt health and version
  GET endpoints from throttling
- Sanitize 404 response in `dynamic-router.js` to prevent route
  structure enumeration
- Strip internal error details from user-facing error messages (e.g.
  profile picture deletion) to avoid information leakage
2026-04-12 17:40:34 -04:00
..