From 5c251a91c3d515a901c28f72a581f35e582ec82a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Kowal?= Date: Wed, 13 Mar 2024 16:06:41 +0100 Subject: [PATCH] #7 Add useful comments for the wrapper --- internal/request/wrapper.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/internal/request/wrapper.go b/internal/request/wrapper.go index 6378d6b..b50aafe 100644 --- a/internal/request/wrapper.go +++ b/internal/request/wrapper.go @@ -5,8 +5,11 @@ import ( "net/http" ) +// Wrapper is used to wrap request, in order to not pass it every time. type Wrapper struct { - Request *http.Request + Request *http.Request + // IPAddress is a real ip address of the client. The difference between this one and request remoteAddr is + // that it can be read from the headers (i.e. if request was forwarded by some kind of proxy). IPAddress *net.IP }