diff --git a/baskets.go b/baskets.go index 781449d..9c02081 100644 --- a/baskets.go +++ b/baskets.go @@ -46,6 +46,7 @@ type RequestData struct { Method string `json:"method"` Path string `json:"path"` Query string `json:"query"` + RemoteAddr string `json:"remote_addr"` } // RequestsPage describes a page with collected requests. @@ -141,6 +142,7 @@ func ToRequestData(req *http.Request) *RequestData { data.Method = req.Method data.Path = req.URL.Path data.Query = req.URL.RawQuery + data.RemoteAddr = strings.Split(req.RemoteAddr, ":")[0] body, _ := ioutil.ReadAll(req.Body) data.Body = string(body) diff --git a/web/basket.html b/web/basket.html index f978a0b..20b7644 100644 --- a/web/basket.html +++ b/web/basket.html @@ -119,6 +119,7 @@ var html = '