- Renamed privkey.pem to testpk.pem so Trivy doesn't flag a false positive by willyguggenheim
- Updated dependencies in package.json
- Removed
/usr/local/lib/node_modulesfrom image to reduce CVE footprint
- Add a
MAX_HEADER_SIZEenvironment variable to set the maximum header size. The default is 1MB.
- The
LOG_IGNORE_PATHenvironment variable now takes a regex, so you can ignore multiple paths.
- Basic handling of gzip content-encoding on requests by matt-mercer
- Error handling for when invalid JSON body is passed in
- Set
PRESERVE_HEADER_CASEto1to attempt to preserve the case of headers in the response. - Set
OVERRIDE_RESPONSE_BODY_FILE_PATHto a path, to override the response body with the contents of that file.
- Implementing configurable CORS settings by ash0ne.
- Update Express to 4.19.2 to address CVE-2024-29041
- Use
PROMETHEUS_ENABLEDwhich enables a Prometheus metrics endpoint at /metrics
- Use
HTTPS_CERT_FILEandHTTPS_KEY_FILEto specify path to a certificate.
- Publishing this image to Github Container Registry. Available at
docker pull ghcr.io/mendhak/http-https-echo:latest
- Certificate now includes Subject Alternative Names as well as Common Name
- Added some
org.opencontainers.imagelabels to the Docker image
- Environment variable
MTLS_ENABLE=1will show details of the client certificate passed in the response body - Environment variable
ECHO_INCLUDE_ENV_VARS=1will include the container (or script's) environment variables in the response body.
- You can pass
x-set-response-content-typein header, or querystring parameter, to set the content type of the response. - Upgrade to Node 16.
- Querystring parameter,
response_body_only=truereturns just the request body in the response.
- Environment variable
DISABLE_REQUEST_LOGS=truewill remove the ExpressJS request log lines - Updated to Node 16
- Removed the
-----------separator
- You can now also send the response delay and response code as querystring parameters.
- You can send an empty response to the client by setting the environment variable
ECHO_BACK_TO_CLIENT=false
- The image is available for multiple architectures. This is being done via docker buildx on Github Actions.
- You can run the container as a different user than the one defined in the image.
- You can pass a
x-set-response-delay-msto set a custom delay in milliseconds.
- You can pass a
x-set-response-status-codeheader to set the response status code
- Dockerfile optimisation, slightly smaller image size
- This changelog added to the repo
- The image now runs as a non-root user by default.
- Optionally allow running as a non root user.
docker run --user node -e HTTP_PORT=8080 -e HTTPS_PORT=8443 -p 8080:8080 -p 8443:8443 --rm mendhak/http-https-echo:issue-14-non-root
#or
docker run --user node --sysctl net.ipv4.ip_unprivileged_port_start=0 -p 8080:80 -p 8443:443 --rm mendhak/http-https-echo:issue-14-non-root
Note: The latest tag is no longer being built, I've removed it from the automated builds. Please don't use the latest tag any longer.
- JWT header
- Choose your own ports
- Choose your own certs
- Ignore a specific path
- JSON payloads
- Single line log output