Skip to content

Feature #141: Added Helmet middleware via config/helmet.js to improve…#146

Open
jikrana1 wants to merge 1 commit into
Sitaram8472:mainfrom
jikrana1:feature/issue-141-add-helmet
Open

Feature #141: Added Helmet middleware via config/helmet.js to improve…#146
jikrana1 wants to merge 1 commit into
Sitaram8472:mainfrom
jikrana1:feature/issue-141-add-helmet

Conversation

@jikrana1

Copy link
Copy Markdown
Contributor

📋 Pull Request — Add Helmet Middleware to Improve API Security

🔗 Related Issue

Closes #141[Feature]: Add Helmet Middleware to Improve API Security

✅ Changes Made

  • Installed the helmet package as a dependency.
  • Created a dedicated configuration file: config/helmet.js for centralized security setup.
  • Imported and applied the helmetMiddleware in server.js early in the middleware chain.
  • Disabled crossOriginEmbedderPolicy to prevent blocking external resources, ensuring zero breaking changes to the API.

🧪 Testing Checklist

  • Helmet package installed successfully.
  • Server starts without any errors.
  • Existing API routes continue to function correctly.
  • Security HTTP headers are now visible in the response.

📌 Benefits Achieved

  • ✅ Improved API Security (Protects against XSS, clickjacking, MIME sniffing).
  • ✅ Cleaner architecture (Security logic is separated into its own module).
  • ✅ Zero downtime/breaking changes.

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.

[Feature] : Add Helmet Middleware to Improve API Security

1 participant