docker-http-https-echo icon indicating copy to clipboard operation
docker-http-https-echo copied to clipboard

Option to restrict logging further

Open klasvo opened this issue 8 months ago • 2 comments

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

klasvo avatar May 07 '25 10:05 klasvo

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

mendhak avatar May 10 '25 21:05 mendhak

Thanks! This works like a charm

Just a note: Using ^ also works to ignore all paths

klasvo avatar May 22 '25 10:05 klasvo