Skip to content

security: add real security headers middleware#708

Merged
lane711 merged 1 commit intomainfrom
merge-pr-663-security-headers
Mar 27, 2026
Merged

security: add real security headers middleware#708
lane711 merged 1 commit intomainfrom
merge-pr-663-security-headers

Conversation

@lane711
Copy link
Copy Markdown
Collaborator

@lane711 lane711 commented Mar 27, 2026

Summary

Cherry-picked from #663 by @mmcintosh

Adds proper security headers middleware (X-Content-Type-Options, X-Frame-Options, HSTS, etc.) to all responses.


Attribution

Closes #663

🤖 Generated with Claude Code

- Create security-headers.ts middleware replacing pass-through stub
- Set X-Content-Type-Options: nosniff (prevents MIME sniffing)
- Set X-Frame-Options: SAMEORIGIN (blocks external framing)
- Set Referrer-Policy: strict-origin-when-cross-origin
- Set Permissions-Policy: camera=(), microphone=(), geolocation=()
- Set HSTS (1 year) in non-development environments
- Apply middleware in app.ts security slot
- Replace stub export in middleware/index.ts

Fixes VULN-005
@lane711 lane711 merged commit 49f0475 into main Mar 27, 2026
2 checks passed
lane711 added a commit that referenced this pull request Mar 30, 2026
Security hardening release:
- SQL injection fix via sort order validation (#713)
- Reflected XSS fix on auth pages (#714)
- Stored XSS fix in content preview (#715)
- Security headers middleware (#708)
- Auth endpoint rate limiting (#707)
- CORS restrictions (#706)
- PBKDF2 password hashing (#705)
- JWT secret to environment variable (#704)

Bug fixes:
- Radio field support (#723)
- Confirm dialogs for repeater/block deletes (#722)
- Rich text editor field types (#721)
- user_profiles migration in core (#718)
- itemTitle for structured arrays (#725)

🤖 Generated with [Claude Code](https://claude.com/claude-code)
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.

2 participants