improve logging

Fixes #381
This commit is contained in:
Nicola Murino
2021-07-24 20:11:17 +02:00
parent 83c7453957
commit c41ae116eb
30 changed files with 237 additions and 150 deletions

View File

@@ -31,7 +31,12 @@ func (c *Connection) GetClientVersion() string {
return ""
}
// GetRemoteAddress return the connected client's address
// GetLocalAddress returns local connection address
func (c *Connection) GetLocalAddress() string {
return util.GetHTTPLocalAddress(c.request)
}
// GetRemoteAddress returns the connected client's address
func (c *Connection) GetRemoteAddress() string {
if c.request != nil {
return c.request.RemoteAddr