A simple HTTP server that logs all GET and POST requests together with their parameters. Using default port 8080. The solution was based on this gist
./server.py [<port>]
sudo docker build -t server .
sudo docker run -it --rm -p <port>:8080 server
sudo docker run -it --rm -p 80:8080 cycodelabs/simple-http-logger
Run this on another session:
curl --data 'foo=bar' localhost:80
And watch the request on your server:
Host: localhost
User-Agent: curl/7.68.0
Accept: */*
Content-Length: 7
Content-Type: application/x-www-form-urlencoded
foo=bar
172.17.0.1 - - [01/Aug/2022 07:07:58] "POST / HTTP/1.1" 200 -