Skip to content

Runtime shield pass: strict CORS, safer headers, and health visibility#641

Merged
nafiuishaaq merged 3 commits into
MentoNest:mainfrom
nottherealalanturing:codex/notthereal-prod-hardening-health
May 30, 2026
Merged

Runtime shield pass: strict CORS, safer headers, and health visibility#641
nafiuishaaq merged 3 commits into
MentoNest:mainfrom
nottherealalanturing:codex/notthereal-prod-hardening-health

Conversation

@nottherealalanturing
Copy link
Copy Markdown
Contributor

@nottherealalanturing nottherealalanturing commented May 30, 2026

Summary

This PR implements the smallest backend hardening changes to satisfy the assigned production/security/health issues.

Included

  • Global CORS configured from CORS_ORIGINS with strict whitelist + localhost allowance in non-production.
  • Global Helmet security headers enabled.
  • x-powered-by disabled and trust-proxy toggle added (TRUST_PROXY=true).
  • Swagger remains disabled in production (enabled only in non-production).
  • Public /health now checks database (SELECT 1), redis, and memory metadata.

Notes

  • This is intentionally minimal and keeps behavior focused on startup/runtime config and health reporting.

Closes #502
Closes #503
Closes #504
Closes #505

@drips-wave
Copy link
Copy Markdown

drips-wave Bot commented May 30, 2026

@nottherealalanturing Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@nafiuishaaq nafiuishaaq merged commit 2b09683 into MentoNest:main May 30, 2026
1 check failed
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.

Health check endpoint CORS configuration Security headers with Helmet Production environment config hardening

4 participants