Skip to content

Improve CORS security and add Helmet#50

Merged
gbowne1 merged 1 commit intogbowne1:masterfrom
Amanc77:enhance/cors-helmet-security
Jan 31, 2026
Merged

Improve CORS security and add Helmet#50
gbowne1 merged 1 commit intogbowne1:masterfrom
Amanc77:enhance/cors-helmet-security

Conversation

@Amanc77
Copy link
Contributor

@Amanc77 Amanc77 commented Jan 25, 2026

Security Setup

This server uses CORS and Helmet for basic security.

CORS only allows requests from the frontend URL.
Helmet adds common HTTP security headers.

Local Environment Setup

Create a .env file in the project root.

Add these values:

PORT=3000
MONGODB_URI=your_mongodb_connection_string
CLIENT_URL=http://localhost:3000

Then start the server.

npm install
npm start

@gbowne1 gbowne1 added enhancement New feature or request help wanted Extra attention is needed good first issue Good for newcomers labels Jan 25, 2026
@gbowne1 gbowne1 linked an issue Jan 25, 2026 that may be closed by this pull request
Copy link
Owner

@gbowne1 gbowne1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Amanc77

I checked out this change locally for testing and review for merge

This PR adds cors options to the server.

This might now conflict if #55 gets merged as we changed to an async/await for the server and or database connection there.

It does work properly as is but might need to be checked against #55

I'll approve this PR for merge pending further review by other collaborators and maintainers.

Ensure that this PR won't conflict when #55 gets merged.

Thanks for the opportunity to review your PR and for your contribution to this project. Please feel free to work on this project issues

@gbowne1 gbowne1 requested a review from EricKart January 26, 2026 09:30
@gbowne1 gbowne1 mentioned this pull request Jan 26, 2026
Copy link
Collaborator

@shishir-21 shishir-21 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gbowne1

Agreed — the PR looks good functionally and does address Issue #46.
Good callout about the potential conflict with #55. It would be best to recheck or rebase this PR once #55 is merged to avoid conflicts in the server/db setup.

No additional blocking comments from my side.

Thanks

@gbowne1
Copy link
Owner

gbowne1 commented Jan 28, 2026

@shishir-21 Thanks for the review. I'll merge after 1 more review

@gbowne1 gbowne1 requested review from Ved178 and shishir-21 January 30, 2026 19:34
Copy link
Collaborator

@shishir-21 shishir-21 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gbowne1

I have already reviewed this pr,
and No additional blocking comments from my side.

@gbowne1
Copy link
Owner

gbowne1 commented Jan 31, 2026

My bad sorry.

@shishir-21
Copy link
Collaborator

No problem 👍

Copy link
Collaborator

@Ved178 Ved178 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi this PR looks good. The merge conflict with #55 is the only concern. No other issues from my side.

@gbowne1 gbowne1 merged commit 1f7eb8f into gbowne1:master Jan 31, 2026
@Amanc77
Copy link
Contributor Author

Amanc77 commented Jan 31, 2026

Thanks everyone for the reviews and merging this PR.

@gbowne1
Copy link
Owner

gbowne1 commented Jan 31, 2026

@Amanc77

Sorry for the delay we're going through a review process with the PRs we have now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[TODO][Enhance] improve CORS security

4 participants