Skip to content

Commit 2c642af

Browse files
committed
References updated to v 41
1 parent eeebe09 commit 2c642af

2 files changed

Lines changed: 22 additions & 22 deletions

File tree

README.md

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ It comes with various options that can manipulate the response output, see the t
88

99
![browser](./screenshots/screenshot.png)
1010

11-
The image is available on [Docker Hub](https://hub.docker.com/r/mendhak/http-https-echo): `mendhak/http-https-echo:40`
12-
The image is available on [Github Container Registry](https://github.com/mendhak/docker-http-https-echo/pkgs/container/http-https-echo): `ghcr.io/mendhak/http-https-echo:40`
11+
The image is available on [Docker Hub](https://hub.docker.com/r/mendhak/http-https-echo): `mendhak/http-https-echo:41`
12+
The image is available on [Github Container Registry](https://github.com/mendhak/docker-http-https-echo/pkgs/container/http-https-echo): `ghcr.io/mendhak/http-https-echo:41`
1313

1414
Please do not use the `:latest` tag as it will break without warning, use a specific version instead.
1515

@@ -47,7 +47,7 @@ This image is executed as non root by default and is fully compliant with Kubern
4747

4848
Run with Docker
4949

50-
docker run -p 8080:8080 -p 8443:8443 --rm -t mendhak/http-https-echo:40
50+
docker run -p 8080:8080 -p 8443:8443 --rm -t mendhak/http-https-echo:41
5151

5252
Or run with Docker Compose
5353

@@ -64,13 +64,13 @@ You can choose a different internal port instead of 8080 and 8443 with the `HTTP
6464

6565
In this example I'm setting http to listen on 8888, and https to listen on 9999.
6666

67-
docker run -e HTTP_PORT=8888 -e HTTPS_PORT=9999 -p 8080:8888 -p 8443:9999 --rm -t mendhak/http-https-echo:40
67+
docker run -e HTTP_PORT=8888 -e HTTPS_PORT=9999 -p 8080:8888 -p 8443:9999 --rm -t mendhak/http-https-echo:41
6868

6969

7070
With docker compose, this would be:
7171

7272
my-http-listener:
73-
image: mendhak/http-https-echo:40
73+
image: mendhak/http-https-echo:41
7474
environment:
7575
- HTTP_PORT=8888
7676
- HTTPS_PORT=9999
@@ -86,7 +86,7 @@ The certificates are at `/app/fullchain.pem` and `/app/testpk.pem`.
8686
You can use volume mounting to substitute the certificate and private key with your own.
8787

8888
my-http-listener:
89-
image: mendhak/http-https-echo:40
89+
image: mendhak/http-https-echo:41
9090
ports:
9191
- "8080:8080"
9292
- "8443:8443"
@@ -101,14 +101,14 @@ You can use the environment variables `HTTPS_CERT_FILE` and `HTTPS_KEY_FILE` to
101101

102102
By default, Express is configured to trust forwarded proxy headers from loopback, link-local, and private IP ranges. To also trust additional proxy IPs or subnets, set `ADDITIONAL_TRUSTED_PROXIES` to a single value or a comma-separated list.
103103

104-
docker run -e ADDITIONAL_TRUSTED_PROXIES="2001:db8::/32,203.0.113.10" -p 8080:8080 -p 8443:8443 --rm -t mendhak/http-https-echo:40
104+
docker run -e ADDITIONAL_TRUSTED_PROXIES="2001:db8::/32,203.0.113.10" -p 8080:8080 -p 8443:8443 --rm -t mendhak/http-https-echo:41
105105

106106

107107
## Decode JWT header
108108

109109
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.
110110

111-
docker run -e JWT_HEADER=Authentication -p 8080:8080 -p 8443:8443 --rm -it mendhak/http-https-echo:40
111+
docker run -e JWT_HEADER=Authentication -p 8080:8080 -p 8443:8443 --rm -it mendhak/http-https-echo:41
112112

113113

114114
Now make your request with `Authentication: eyJ...` header (it should also work with the `Authentication: Bearer eyJ...` schema too):
@@ -121,7 +121,7 @@ And in the output you should see a `jwt` section.
121121

122122
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.
123123

124-
docker run --rm -e DISABLE_REQUEST_LOGS=true --name http-echo-tests -p 8080:8080 -p 8443:8443 -t mendhak/http-https-echo:40
124+
docker run --rm -e DISABLE_REQUEST_LOGS=true --name http-echo-tests -p 8080:8080 -p 8443:8443 -t mendhak/http-https-echo:41
125125

126126

127127
## Do not log specific path
@@ -130,12 +130,12 @@ Set the environment variable `LOG_IGNORE_PATH` to a path or a regex you would li
130130
This can help reduce noise from healthchecks in orchestration/infrastructure like Swarm, Kubernetes, ALBs, etc.
131131

132132
# Ignore a single path
133-
docker run -e LOG_IGNORE_PATH=/ping -p 8080:8080 -p 8443:8443 --rm -t mendhak/http-https-echo:40
133+
docker run -e LOG_IGNORE_PATH=/ping -p 8080:8080 -p 8443:8443 --rm -t mendhak/http-https-echo:41
134134
# Ignore multiple paths
135-
docker run -e LOG_IGNORE_PATH="^\/ping|^\/health|^\/metrics" -p 8080:8080 -p 8443:8443 -t mendhak/http-https-echo:40
135+
docker run -e LOG_IGNORE_PATH="^\/ping|^\/health|^\/metrics" -p 8080:8080 -p 8443:8443 -t mendhak/http-https-echo:41
136136
# Ignore all paths
137-
docker run -e LOG_IGNORE_PATH=".*" -p 8080:8080 -p 8443:8443 -t mendhak/http-https-echo:40
138-
docker run -e LOG_IGNORE_PATH="^" -p 8080:8080 -p 8443:8443 -t mendhak/http-https-echo:40
137+
docker run -e LOG_IGNORE_PATH=".*" -p 8080:8080 -p 8443:8443 -t mendhak/http-https-echo:41
138+
docker run -e LOG_IGNORE_PATH="^" -p 8080:8080 -p 8443:8443 -t mendhak/http-https-echo:41
139139

140140

141141

@@ -162,15 +162,15 @@ Will contain a `json` property in the response/output.
162162
You can disable new lines in the log output by setting the environment variable `LOG_WITHOUT_NEWLINE`. For example,
163163

164164
```bash
165-
docker run -e LOG_WITHOUT_NEWLINE=true -p 8080:8080 -p 8443:8443 --rm -t mendhak/http-https-echo:40
165+
docker run -e LOG_WITHOUT_NEWLINE=true -p 8080:8080 -p 8443:8443 --rm -t mendhak/http-https-echo:41
166166
```
167167

168168
## Send an empty response
169169

170170
You can disable the JSON output in the response by setting the environment variable `ECHO_BACK_TO_CLIENT`. For example,
171171

172172
```bash
173-
docker run -e ECHO_BACK_TO_CLIENT=false -p 8080:8080 -p 8443:8443 --rm -t mendhak/http-https-echo:40
173+
docker run -e ECHO_BACK_TO_CLIENT=false -p 8080:8080 -p 8443:8443 --rm -t mendhak/http-https-echo:41
174174
```
175175

176176
## Custom status code
@@ -251,7 +251,7 @@ You can have environment variables (that are visible to the echo server's proces
251251
Pass the `ECHO_INCLUDE_ENV_VARS=1` environment variable in.
252252

253253
```bash
254-
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:40
254+
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:41
255255
```
256256

257257
Then do a normal request via curl or browser, and you will see the `env` property in the response body.
@@ -291,7 +291,7 @@ openssl pkcs12 -export -in cert.pem -inkey testpk.pem -out certpkcs12.pfx
291291
By default, the headers in the response body are lowercased. To attempt to preserve the case of headers in the response body, set the environment variable `PRESERVE_HEADER_CASE` to true.
292292

293293
```bash
294-
docker run -e PRESERVE_HEADER_CASE=true -p 8080:8080 -p 8443:8443 --rm -t mendhak/http-https-echo:40
294+
docker run -e PRESERVE_HEADER_CASE=true -p 8080:8080 -p 8443:8443 --rm -t mendhak/http-https-echo:41
295295
```
296296

297297
## Override the response body with a file
@@ -300,23 +300,23 @@ To override the response body with a file, set the environment variable `OVERRID
300300
The file path needs to be in the `/app` directory.
301301

302302
```bash
303-
docker run -d --rm -v ${PWD}/test.html:/app/test.html -p 8080:8080 -e OVERRIDE_RESPONSE_BODY_FILE_PATH=/test.html -t mendhak/http-https-echo:40
303+
docker run -d --rm -v ${PWD}/test.html:/app/test.html -p 8080:8080 -e OVERRIDE_RESPONSE_BODY_FILE_PATH=/test.html -t mendhak/http-https-echo:41
304304
```
305305

306306
## Set a maximum header size
307307

308308
You can use the `MAX_HEADER_SIZE` environment variable to set a maximum header size in bytes. The default is 1MB.
309309

310310
```bash
311-
docker run -d --rm -e MAX_HEADER_SIZE=1000 -p 8080:8080 -p 8443:8443 -t mendhak/http-https-echo:40
311+
docker run -d --rm -e MAX_HEADER_SIZE=1000 -p 8080:8080 -p 8443:8443 -t mendhak/http-https-echo:41
312312
```
313313

314314
## Cookies and Signed Cookies
315315

316316
Make a request with a `Cookie` header and the response will include the cookies:
317317

318318
```bash
319-
docker run -d --rm --name http-echo-tests -p 8080:8080 -p 8443:8443 -t mendhak/http-https-echo:40
319+
docker run -d --rm --name http-echo-tests -p 8080:8080 -p 8443:8443 -t mendhak/http-https-echo:41
320320
```
321321

322322
Then make a request with a cookie header:
@@ -328,7 +328,7 @@ curl -s http://localhost:8080/ -H "Cookie: foo=bar; baz=qux"
328328
To enable signed cookie support, set the `COOKIE_SECRET` environment variable. Signed cookies appear in the `signedCookies` section of the response:
329329

330330
```bash
331-
docker run -d --rm -e COOKIE_SECRET=mysecretkey123 --name http-echo-tests -p 8080:8080 -p 8443:8443 -t mendhak/http-https-echo:40
331+
docker run -d --rm -e COOKIE_SECRET=mysecretkey123 --name http-echo-tests -p 8080:8080 -p 8443:8443 -t mendhak/http-https-echo:41
332332
```
333333

334334
Now you need to generate a signed cookie, and send it in the header. Here's a convenience node snippet:

docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
version: '3'
22
services:
33
my-http-listener:
4-
image: mendhak/http-https-echo:40
4+
image: mendhak/http-https-echo:41
55
environment:
66
- HTTP_PORT=8888
77
- HTTPS_PORT=9999

0 commit comments

Comments
 (0)