Skip to content

Commit af0d34c

Browse files
committed
Version 27
1 parent 125f063 commit af0d34c

3 files changed

Lines changed: 15 additions & 12 deletions

File tree

CHANGELOG.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
## Version `26` - 2022-xx-xx
1+
## Version `27` - 2022-11-24
2+
* Added some `org.opencontainers.image` labels to the Docker image
3+
4+
## Version `26` - 2022-10-30
25

36
* Environment variable `MTLS_ENABLE=1` will show details of the client certificate passed in the response body
47
* Environment variable `ECHO_INCLUDE_ENV_VARS=1` will include the container (or script's) environment variables in the response body.

README.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ Please do not use the `:latest` tag as it will break without warning, use a spec
3838

3939
Run with Docker
4040

41-
docker run -p 8080:8080 -p 8443:8443 --rm -t mendhak/http-https-echo:26
41+
docker run -p 8080:8080 -p 8443:8443 --rm -t mendhak/http-https-echo:27
4242

4343
Or 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

5656
In 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:26
58+
docker run -e HTTP_PORT=8888 -e HTTPS_PORT=9999 -p 8080:8888 -p 8443:9999 --rm -t mendhak/http-https-echo:27
5959

6060

6161
With docker compose, this would be:
6262

6363
my-http-listener:
64-
image: mendhak/http-https-echo:26
64+
image: mendhak/http-https-echo:27
6565
environment:
6666
- HTTP_PORT=8888
6767
- HTTPS_PORT=9999
@@ -75,7 +75,7 @@ With docker compose, this would be:
7575
Use 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:26
78+
image: mendhak/http-https-echo:27
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

9090
If 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:26
92+
docker run -e JWT_HEADER=Authentication -p 8080:8080 -p 8443:8443 --rm -it mendhak/http-https-echo:27
9393

9494

9595
Now 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

103103
In 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:26
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
106106

107107

108108
## Do not log specific path
109109

110110
Set the environment variable `LOG_IGNORE_PATH` to a path you would like to exclude from verbose logging to stdout.
111111
This 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:26
113+
docker run -e LOG_IGNORE_PATH=/ping -p 8080:8080 -p 8443:8443 --rm -t mendhak/http-https-echo:27
114114

115115

116116
With docker compose, this would be:
117117

118118
my-http-listener:
119-
image: mendhak/http-https-echo:26
119+
image: mendhak/http-https-echo:27
120120
environment:
121121
- LOG_IGNORE_PATH=/ping
122122
ports:
@@ -147,7 +147,7 @@ Will contain a `json` property in the response/output.
147147
You 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:26
150+
docker run -e ECHO_BACK_TO_CLIENT=false -p 8080:8080 -p 8443:8443 --rm -t mendhak/http-https-echo:27
151151
```
152152

153153
## Custom status code
@@ -228,7 +228,7 @@ You can have environment variables (that are visible to the echo server's proces
228228
Pass 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:26
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
232232
```
233233

234234
Then do a normal request via curl or browser, and you will see the `env` property in the response body.

docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ version: '3'
22
services:
33

44
my-http-listener:
5-
image: mendhak/http-https-echo:26
5+
image: mendhak/http-https-echo:27
66
environment:
77
- HTTP_PORT=8888
88
- HTTPS_PORT=9999

0 commit comments

Comments
 (0)