Skip to content

feat: security hardening (rate limiting, validation, bot protection)#1

Merged
masonlet merged 12 commits into
mainfrom
feat/security
Mar 14, 2026
Merged

feat: security hardening (rate limiting, validation, bot protection)#1
masonlet merged 12 commits into
mainfrom
feat/security

Conversation

@masonlet

Copy link
Copy Markdown
Member

Secures the contact endpoint beyond basic usage.

Changes

  • Rate limiting via Vercel WAF (@vercel/firewall)
  • Input validation: email format, field length limits (subject: 200, message: 2000)
  • Honeypot protection: silent fax_number traps bots, triggers a warning log
  • Email header injection prevention: \r\n stripped from subject before sending
  • Content-type enforcement: rejects non-application/json requests with 415
  • CORS hardening: headers set before rate limit check to ensure correct behaviour
  • Input trimming before dispatch

@vercel

vercel Bot commented Mar 14, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
contact-api Ready Ready Preview, Comment Mar 14, 2026 7:03pm

@masonlet
masonlet merged commit ecadfa6 into main Mar 14, 2026
2 checks passed
@masonlet
masonlet deleted the feat/security branch March 14, 2026 19:04
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