Skip to content

Commit 2af51d2

Browse files
Copilotgaby
andauthored
test(proxy): clarify app.Test client IP expectation
Agent-Logs-Url: https://github.com/gofiber/fiber/sessions/806acfbb-3625-48d4-933f-662e8cedc55b Co-authored-by: gaby <835733+gaby@users.noreply.github.com>
1 parent 2cdf90f commit 2af51d2

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

middleware/proxy/proxy_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -989,14 +989,14 @@ func Test_Proxy_Balancer_Forward_OverwritesXRealIP(t *testing.T) {
989989
t.Parallel()
990990

991991
const (
992-
spoofedIP = "10.0.0.1"
993-
expectedIP = "0.0.0.0"
992+
spoofedIP = "10.0.0.1"
993+
appTestClientIP = "0.0.0.0"
994994
)
995995

996996
_, addr := createProxyTestServerIPv4(t, func(c fiber.Ctx) error {
997997
values := c.GetReqHeaders()["X-Real-Ip"]
998998
require.Len(t, values, 1)
999-
require.Equal(t, expectedIP, values[0])
999+
require.Equal(t, appTestClientIP, values[0])
10001000
return c.SendStatus(fiber.StatusOK)
10011001
})
10021002

0 commit comments

Comments
 (0)