Skip to content

Implementing configurable CORS settings #65

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

Merged
merged 3 commits into from
Apr 7, 2024
Merged

Implementing configurable CORS settings #65

merged 3 commits into from
Apr 7, 2024

Conversation

ash0ne
Copy link

@ash0ne ash0ne commented Mar 30, 2024

Was using docker-http-https-echo to test a frontend app and thought it'd be useful to have a way to specify the CORS policy through config like so.

docker run -d -e CORS_ALLOW_ORIGIN="http://localhost.4000" -e CORS_ALLOW_HEADERS="x-custom-test-header"

Changes

  • Updates to index.js to implement configurable CORS settings for HTTP echo server
  • Updates to README to document the env vars that needed to be updated for setting the CORS policy
  • Added tests in tests.sh

@mendhak
Copy link
Owner

mendhak commented Apr 7, 2024

Nice one, thanks. I'll release it in due CORS 😆

@mendhak mendhak merged commit a3d5655 into mendhak:master Apr 7, 2024
2 checks passed
@mendhak
Copy link
Owner

mendhak commented Apr 7, 2024

:33 is released in Docker Hub and Github Registry.

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