Skip to content

Conversation

@seungpark
Copy link
Contributor

@seungpark seungpark commented Mar 20, 2025

Ticket

DOP-5513

Notes

This PR adds middleware logic to the Express server so that we check the request origin, and append a Response Header for access-control-allow-origin to let the browser know that this is an ok CORS request.

Staging

Tested using the stage API with credentials included in the request:

First screenshot shows response.header missing Access-Control-Allow-Origin because it is from a random domain:

Screenshot 2025-03-20 at 9 51 37 AM

Second screenshot shows response.header with Access-Control-Allow-Origin because it is from a spoofed netlify.app domain:
Screenshot 2025-03-20 at 9 51 25 AM

Note:

  • Above request had to contain Cookie request header to bypass CorSecure

README updates

    • This PR introduces changes that should be reflected in the README, and I have made those updates.
    • This PR does not introduce changes that should be reflected in the README

@seungpark seungpark requested review from rayangler and zdw001 March 20, 2025 13:18
.drone.yml Outdated
trigger:
branch:
- main
- DOP-5513
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Revert changes before merge

@seungpark seungpark requested a review from rayangler March 20, 2025 14:14
@seungpark seungpark merged commit 8857636 into main Mar 20, 2025
1 check passed
@seungpark seungpark deleted the DOP-5513 branch March 20, 2025 14:40
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