When will GIN-GONIC ever support ipv6 in the request logs?!?
It has been centuries since gin-gonic has been released and ipv6 has been around for decades now, so why is support still only for ipv4 and no ipv6 in the request logs???
/endpoint-1 shows the request ip because it is ipv4 but /endpoint-2 request is from ipv6 ip and no show
for years now i have been angry at this and still till today gin-gonic will not add support for ipv6, why????
[GIN] 2025/05/18 - 02:17:58 | 200 | 40.419563613s | 3.239.193.221 | GET "/endpoint-1"
[GIN] 2025/05/18 - 02:37:41 | 200 | 17.644075ms | | GET "/endpoint-2"
I can try to fix this
How do you call the Gin-Server? For me IPv6 adresses are shown in the log if the client calls with an IPv6 adress:
Call with curl an IPv6:
curl -6 http://[2003:de:ef25:XXXX:XXXX:XXXX:XXXX:XXXX]:8080
Log says:
[GIN] 2025/06/24 - 15:31:54 | 404 | 2.267µs | 2003:de:ef25:XXXX:XXXX:XXXX:XXXX:XXXX | GET "/"
Do you have a proxy in front of your server? The function gin.Context#ClientIP is used for logging. Maybe you check: https://github.com/gin-gonic/gin/blob/master/context.go#L902