No description
- Go 90.7%
- Dockerfile 9.3%
|
|
||
|---|---|---|
| .woodpecker | ||
| .dockerignore | ||
| .gitignore | ||
| .goreleaser.yaml | ||
| Dockerfile | ||
| go.mod | ||
| main.go | ||
| README.md | ||
| renovate.json | ||
HTTP logger proxy
This is an HTTP proxy which prints raw full http requests and responses to stdout including http body.
For example:
2024/01/11 03:50:44 ---REQUEST 3---
POST /api/contacts HTTP/1.1
Host: api.example.io
User-Agent: PostmanRuntime/7.28.0
Content-Length: 63
Accept: */*
Accept-Encoding: gzip, deflate, br
Cache-Control: no-cache
Content-Type: application/json
X-Forwarded-For: 172.17.0.1
{
"firstName": "Hans",
"lastName": "Zimmer"
}
2024/01/11 03:50:44 ---RESPONSE 3---
HTTP/1.1 201 Created
Content-Length: 68
Access-Control-Allow-Origin: *
Content-Type: application/json; charset=UTF-8
Date: Wed, 05 May 2021 03:50:45 GMT
Server: Google Frontend
X-Cloud-Trace-Context: 83ac5937ae7ba8f3ef96ee941227b1b0
{
"salesforceId": "a0C3L0000008ZSNUA2",
"action": "updated"
}
Build image
docker build -t metawave/http-logger-proxy .
Start
docker run --rm -it -p 8888:8888 -e PORT=8888 -e TARGET=http://google.com metawave/http-logger-proxy