Skip to content

Conversation

imaitland
Copy link
Member

This PR (ssec-jhu/evolver-ui#61) means all Evolver HTTP requests originate from the browser. This means the evolver-ng service must include a CORS header allowing requests for a locally running ui instance. Later we can add the domain where the ui is hosted.

@imaitland imaitland requested a review from a team as a code owner June 4, 2025 18:28
@imaitland imaitland requested a review from amitschang June 4, 2025 18:28
Copy link

codecov bot commented Jun 4, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

📢 Thoughts on this report? Let us know!


app.add_middleware(
CORSMiddleware,
allow_origin_regex=r"https?://(localhost|127\.0\.0\.1)(:\d+)?",
Copy link
Member

Choose a reason for hiding this comment

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

Should we keep this in the AppSettings? In the settings we could also store the list of allowed origins (defaulting to [] and used here for allowed_origins), so then the change here would be complete and no need to update later.

Copy link
Member Author

Choose a reason for hiding this comment

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

yeah good idea. appsettings makes sense for this.

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