Skip to content

Add CSRF protection and rate limiting to maintenance requests - #83

Open
ashrafkhamiss wants to merge 2 commits into
Advanced-Computer-Lab-2026:mainfrom
ashrafkhamiss:main
Open

ashrafkhamiss wants to merge 2 commits into
Advanced-Computer-Lab-2026:mainfrom
ashrafkhamiss:main

Conversation

@ashrafkhamiss

Copy link
Copy Markdown
  • Require a csrf-csrf double-submit token on every state-changing request; GET/HEAD/OPTIONS and the pre-auth login/register routes stay exempt
  • Expose GET /api/csrf-token and have the client echo the token in the x-csrf-token header on each write
  • Rate-limit /api/maintenance with express-rate-limit (30 requests/minute)
  • Add the CSRF and DoS test suites with their jest and babel config

ashrafkhamiss and others added 2 commits November 12, 2026 15:03
- Require a csrf-csrf double-submit token on every state-changing request;
  GET/HEAD/OPTIONS and the pre-auth login/register routes stay exempt
- Expose GET /api/csrf-token and have the client echo the token in the
  x-csrf-token header on each write
- Rate-limit /api/maintenance with express-rate-limit (30 requests/minute)
- Add the CSRF and DoS test suites with their jest and babel config

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant