Sign inSign up

2chris/headertest

By 2chris

•Updated about 3 years ago

Simple website to check request headers (for testing reverse proxy configurations)

Image
0

1.1K

2chris/headertest repository overview

⁠HeaderTest

This is a simple website to check request headers (for testing reverse proxy configurations).

This can be useful to test a reverse proxy configuration, for example if the reverse proxy sets headers or strips unwanted headers. For example if the reverse proxy sets the X-Forwarded-For header. By default Apache appends its IP address if the client already sends a X-Forwarded-For header.

This website has 2 endpoints:

/ shows an HTML page with the headers like this:

NameValue
Accepttext/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7
Accept-Encodinggzip, deflate, br

/api/headers/ returns a json string with the headers like this:

{
    "Accept": [
        "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7"
    ],
    "Accept-Encoding": [
        "gzip, deflate, br"
    ]
}

It listens on port 80 for HTTP requests.

⁠Usage

docker run -d
  -p 8080:80 \
  2chris/headertest:latest

In this case, port 8080 is the port the reverse proxy connects to.

Github: Chri-s/HeaderTest⁠

Tag summary

Content type

Image

Digest

sha256:cd7b5d588…

Size

84.9 MB

Last updated

about 3 years ago

docker pull 2chris/headertest