@@ -38,7 +38,7 @@ Please do not use the `:latest` tag as it will break without warning, use a spec
3838
3939Run with Docker
4040
41- docker run -p 8080:8080 -p 8443:8443 --rm -t mendhak/http-https-echo:27
41+ docker run -p 8080:8080 -p 8443:8443 --rm -t mendhak/http-https-echo:28
4242
4343Or run with Docker Compose
4444
@@ -55,13 +55,13 @@ You can choose a different internal port instead of 8080 and 8443 with the `HTTP
5555
5656In this example I'm setting http to listen on 8888, and https to listen on 9999.
5757
58- docker run -e HTTP_PORT=8888 -e HTTPS_PORT=9999 -p 8080:8888 -p 8443:9999 --rm -t mendhak/http-https-echo:27
58+ docker run -e HTTP_PORT=8888 -e HTTPS_PORT=9999 -p 8080:8888 -p 8443:9999 --rm -t mendhak/http-https-echo:28
5959
6060
6161With docker compose, this would be:
6262
6363 my-http-listener:
64- image: mendhak/http-https-echo:27
64+ image: mendhak/http-https-echo:28
6565 environment:
6666 - HTTP_PORT=8888
6767 - HTTPS_PORT=9999
@@ -75,7 +75,7 @@ With docker compose, this would be:
7575Use volume mounting to substitute the certificate and private key with your own. This example uses the snakeoil cert.
7676
7777 my-http-listener:
78- image: mendhak/http-https-echo:27
78+ image: mendhak/http-https-echo:28
7979 ports:
8080 - "8080:8080"
8181 - "8443:8443"
@@ -89,7 +89,7 @@ Use volume mounting to substitute the certificate and private key with your own.
8989
9090If you specify the header that contains the JWT, the echo output will contain the decoded JWT. Use the ` JWT_HEADER ` environment variable for this.
9191
92- docker run -e JWT_HEADER=Authentication -p 8080:8080 -p 8443:8443 --rm -it mendhak/http-https-echo:27
92+ docker run -e JWT_HEADER=Authentication -p 8080:8080 -p 8443:8443 --rm -it mendhak/http-https-echo:28
9393
9494
9595Now make your request with ` Authentication: eyJ... ` header (it should also work with the ` Authentication: Bearer eyJ... ` schema too):
@@ -102,21 +102,21 @@ And in the output you should see a `jwt` section.
102102
103103In the log output set the environment variable ` DISABLE_REQUEST_LOGS ` to true, to disable the specific ExpressJS request log lines. The ones like ` ::ffff:172.17.0.1 - - [03/Jan/2022:21:31:51 +0000] "GET /xyz HTTP/1.1" 200 423 "-" "curl/7.68.0" ` . The JSON output will still appear.
104104
105- docker run --rm -e DISABLE_REQUEST_LOGS=true --name http-echo-tests -p 8080:8080 -p 8443:8443 -t mendhak/http-https-echo:27
105+ docker run --rm -e DISABLE_REQUEST_LOGS=true --name http-echo-tests -p 8080:8080 -p 8443:8443 -t mendhak/http-https-echo:28
106106
107107
108108## Do not log specific path
109109
110110Set the environment variable ` LOG_IGNORE_PATH ` to a path you would like to exclude from verbose logging to stdout.
111111This can help reduce noise from healthchecks in orchestration/infrastructure like Swarm, Kubernetes, ALBs, etc.
112112
113- docker run -e LOG_IGNORE_PATH=/ping -p 8080:8080 -p 8443:8443 --rm -t mendhak/http-https-echo:27
113+ docker run -e LOG_IGNORE_PATH=/ping -p 8080:8080 -p 8443:8443 --rm -t mendhak/http-https-echo:28
114114
115115
116116With docker compose, this would be:
117117
118118 my-http-listener:
119- image: mendhak/http-https-echo:27
119+ image: mendhak/http-https-echo:28
120120 environment:
121121 - LOG_IGNORE_PATH=/ping
122122 ports:
@@ -147,7 +147,7 @@ Will contain a `json` property in the response/output.
147147You can disable the JSON output in the response by setting the environment variable ` ECHO_BACK_TO_CLIENT ` . For example,
148148
149149``` bash
150- docker run -e ECHO_BACK_TO_CLIENT=false -p 8080:8080 -p 8443:8443 --rm -t mendhak/http-https-echo:27
150+ docker run -e ECHO_BACK_TO_CLIENT=false -p 8080:8080 -p 8443:8443 --rm -t mendhak/http-https-echo:28
151151```
152152
153153## Custom status code
@@ -228,7 +228,7 @@ You can have environment variables (that are visible to the echo server's proces
228228Pass the ` ECHO_INCLUDE_ENV_VARS=1 ` environment variable in.
229229
230230``` bash
231- docker run -d --rm -e ECHO_INCLUDE_ENV_VARS=1 --name http-echo-tests -p 8080:8080 -p 8443:8443 -t mendhak/http-https-echo:27
231+ docker run -d --rm -e ECHO_INCLUDE_ENV_VARS=1 --name http-echo-tests -p 8080:8080 -p 8443:8443 -t mendhak/http-https-echo:28
232232```
233233
234234Then do a normal request via curl or browser, and you will see the ` env ` property in the response body.
0 commit comments