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

Add HTTP.CORS environment configuration to better support decoupled local development #17

Open
ben-hamelin opened this issue Nov 2, 2023 · 2 comments

Comments

@ben-hamelin
Copy link

ben-hamelin commented Nov 2, 2023

With a decoupled architecture it can be challenging to support testing without proper CORS configuration in both the frontend application and the Elastic instance.

Can we consider adding http.core config to the compose file? e.g.
environment: - "http.cors.allow-origin=*" - "http.cors.enabled=true" - "http.cors.allow-headers=X-Requested-With,X-Auth-Token,Content-Type,Content-Length,Authorization,Access-Control-Allow-Origin,Access-Control-Request-Headers" - "http.cors.allow-credentials=true" - "http.cors.allow-methods: OPTIONS, HEAD, GET, POST, PUT, DELETE"

Or alternatively, maybe a simple README update on how to override this if needed, similar to the memory note that is already in place.

@rfay
Copy link
Member

rfay commented Nov 2, 2023

A PR should be easy right? It will be welcome. It won't do any harm, true? I'm surprised that front-end would be accessing elasticsearch directly.

@ben-hamelin
Copy link
Author

Thanks @rfay ! Drafted the initial PR: #19
As this is my first contribution I want to spend some time reviewing the tests, documentation as well.
If anything stands out right away please let me know!

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