An application that is useful for debugging HTTP requests when a proxy sits between a client and a server. Point your client or proxy server to this application instead of the origin server and it will respond back with the HTTP request (including headers and JSON body) information received from the client or proxy as a JSON response.
[user@host]# curl http://localhost -d 'Hello World!'
{
"body": "Hello World!",
"headers": {
"accept": "*/*",
"content-length": "12",
"content-type": "application/x-www-form-urlencoded",
"host": "localhost",
"user-agent": "curl/7.29.0"
},
"request": {
"content_length": "12",
"content_type": "application/x-www-form-urlencoded",
"path_info": "/",
"query_string": "",
"remote_addr": "172.22.0.1",
"request_method": "POST",
"request_scheme": "http",
"request_uri": "/",
"server_addr": "172.22.0.2",
"server_name": "localhost",
"server_port": "80",
"server_protocol": "HTTP/1.1",
"server_software": "Unit/1.21.0"
}
}
The application can be configured by passing environment variables to the container.
infostringnullLOG_LEVEL=infoWrites the server response to STDOUT in addition to the HTTP response.
There are two versions of this container image to allow for execution in unprivileged environments.
| Tag | UID | GID | Ports |
|---|---|---|---|
latest | root | root | 80, 443 |
latest-unprivileged | nginx | nginx | 8080, 8443 |
Content type
Image
Digest
sha256:34bd194ef…
Size
73 MB
Last updated
about 3 years ago
docker pull kryshakm/headers