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

Allow CORS headers to be sent #35

Open
rose-m opened this issue Apr 23, 2021 · 0 comments
Open

Allow CORS headers to be sent #35

rose-m opened this issue Apr 23, 2021 · 0 comments

Comments

@rose-m
Copy link

rose-m commented Apr 23, 2021

First of all thanks for the great tool being a really nice replacement for http.server on steroids 👍

One thing I'd love to have is the support for CORS headers / enabling CORS for the server.

Background:
In some places I'd like to maybe serve a small script or similar to a web page (e.g. to inject some arbitrary code). However, browsers will block loading the resource if the server does not send appropriate CORS headers.

Potential solution:
Since updog uses Flask it might be as easy as to bring in https://github.com/corydolphin/flask-cors and add an additional command line argument, e.g. --cors to enable this behavior (as an opt-in).

If you in general agree on this being a good idea I could come up with a PR.

Downside:
It would increase the list of dependencies of updog to include flask-cors and make the installation bigger.

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

No branches or pull requests

1 participant