Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

First pass at implementing cors #1109

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

Conversation

czcollier
Copy link

@czcollier czcollier commented Nov 19, 2024

fixes #1110

Change-Id: I4da216d52191baabab9f63cc3ee6ae749add906f
@czcollier czcollier mentioned this pull request Nov 19, 2024
@wwwillchen
Copy link
Collaborator

wwwillchen commented Nov 20, 2024

Hey - thanks for opening this PR. I left a comment on the issue: #1110 (comment)

I don't think I fully understand the requested use case, but it's not clear to me how setting Access-Control-Allow-Origin on
index.html (which is effectively what this PR is doing) would address your use case. It seems pretty unusual to want to do a cross-origin XHR/fetch for the index.html, particularly for a Mesop app.

@@ -33,6 +34,7 @@ class PageConfig:
title: str
stylesheets: list[str]
security_policy: SecurityPolicy
cors: CORS
Copy link
Collaborator

Choose a reason for hiding this comment

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

Instead of a separate parameter in PageConfig, I would put CORS into SecurityPolicy (i.e. allowed_cors_origins) since CORS is security-related

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.

CORS support
2 participants