- Error handling for when invalid JSON body is passed in
- Set
PRESERVE_HEADER_CASE
to1
to attempt to preserve the case of headers in the response. - Set
OVERRIDE_RESPONSE_BODY_FILE_PATH
to 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_ENABLED
which enables a Prometheus metrics endpoint at /metrics
- Use
HTTPS_CERT_FILE
andHTTPS_KEY_FILE
to 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.image
labels to the Docker image
- Environment variable
MTLS_ENABLE=1
will show details of the client certificate passed in the response body - Environment variable
ECHO_INCLUDE_ENV_VARS=1
will include the container (or script's) environment variables in the response body.
- You can pass
x-set-response-content-type
in header, or querystring parameter, to set the content type of the response. - Upgrade to Node 16.
- Querystring parameter,
response_body_only=true
returns just the request body in the response.
- Environment variable
DISABLE_REQUEST_LOGS=true
will 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-ms
to set a custom delay in milliseconds.
- You can pass a
x-set-response-status-code
header 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