Skip to content

Latest commit

 

History

History
49 lines (32 loc) · 856 Bytes

README.md

File metadata and controls

49 lines (32 loc) · 856 Bytes

Simple Python Server Logger

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

How to Run

Python

./server.py [<port>]

Docker

sudo docker build -t server .
sudo docker run -it --rm -p <port>:8080 server

Docker (from Docker Hub)

sudo docker run -it --rm -p 80:8080 cycodelabs/simple-http-logger

Results

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 -