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

CORS for get endpoints #21

Open
benwiley4000 opened this issue Mar 31, 2019 · 2 comments
Open

CORS for get endpoints #21

benwiley4000 opened this issue Mar 31, 2019 · 2 comments

Comments

@benwiley4000
Copy link
Contributor

Unless I'm missing something, it seems like there's no supported way to access the endpoints like /_stats and /_live outside of the analytics domain in a browser. It seems relatively harmless for these to be access-control-allow-origin: *. However that should be different configuration than cors for post requests, since while it makes sense to make the auditing info available wherever, I'd likewise want to be able to restrict analytics post requests to a single domain.

I'd be happy to make a PR if we can agree on what the API would look like. What do you think? I'm wondering if it makes sense to add a new flag called endpointsOrigin which is the same as origin but only for the non-/ GET endpoints?

@vesparny
Copy link
Owner

vesparny commented Apr 1, 2019

hey @benwiley4000 thanks for the input.
I think what you said makes perfect sense. We definitely want to have those endpoints available from other domains.

Since the change is harmless, as you mentioned, I'd change the default CORS config for those specific endpoints rather than introducing a new configuration flag.
What do you think?

@benwiley4000
Copy link
Contributor Author

benwiley4000 commented Apr 1, 2019 via email

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

2 participants