From ffe7ac09d07dbe894d0fa20a36ce793ee04d93a0 Mon Sep 17 00:00:00 2001 From: "Manu Mtz.-Almeida" Date: Mon, 8 Feb 2021 14:22:58 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 0289d1a2..e06ab992 100644 --- a/README.md +++ b/README.md @@ -2143,15 +2143,13 @@ func main() { router.TrustedProxies = []string{"192.168.1.2"} router.GET("/", func(c *gin.Context) { - // If the client is 192.168.1.2, use the X-Forwarded-For // header to deduce the original client IP from the trust- // worthy parts of that header. // Otherwise, simply return the direct client IP - fmt.Printf("ClientIP: %s\n", c.ClientIP()) - }) - - router.Run() + fmt.Printf("ClientIP: %s\n", c.ClientIP()) + }) + router.Run() } ```