docker-http-https-echo
docker-http-https-echo copied to clipboard
Option to restrict logging further
Hi,
it would be nice if there was an option to restrict logging further:
- either completely deactivate logging
- specify more than one path with
LOG_IGNORE_PATH
The latter could be implemented by doing a regex match instead of a string comparison.
Without requests being logged, one could assure that no personal or secret data gets leaked.
Cheers Volker
I've got a PR going and also published a temporary tag to Docker Hub if you want to test:
docker pull mendhak/http-https-echo:issue80
Examples:
# Ignore a single path
docker run -e LOG_IGNORE_PATH=/ping -p 8080:8080 -p 8443:8443 --rm -t mendhak/http-https-echo:issue80
# Ignore multiple paths
docker run -e LOG_IGNORE_PATH="^\/ping|^\/health|^\/metrics" -p 8080:8080 -p 8443:8443 -t mendhak/http-https-echo:issue80
# Ignore all paths
docker run -e LOG_IGNORE_PATH=".*" -p 8080:8080 -p 8443:8443 -t mendhak/http-https-echo:issue80
Thanks! This works like a charm
Just a note: Using ^ also works to ignore all paths