Skip to content

Implementing configurable CORS settings#65

Merged
mendhak merged 3 commits intomendhak:masterfrom
homelabdude:master
Apr 7, 2024
Merged

Implementing configurable CORS settings#65
mendhak merged 3 commits intomendhak:masterfrom
homelabdude:master

Conversation

@homelabdude
Copy link
Copy Markdown

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
Copy Markdown
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
@mendhak
Copy link
Copy Markdown
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