diff --git a/context_test.go b/context_test.go index 3cfde11..7c9e0c7 100644 --- a/context_test.go +++ b/context_test.go @@ -408,6 +408,8 @@ func TestContextClientIP(t *testing.T) { assert.Equal(t, c.ClientIP(), "10.10.10.10") c.Request.Header.Del("X-Real-IP") assert.Equal(t, c.ClientIP(), "20.20.20.20") + c.Request.Header.Set("X-Forwarded-For", "30.30.30.30") + assert.Equal(t, c.ClientIP(), "30.30.30.30") c.Request.Header.Del("X-Forwarded-For") assert.Equal(t, c.ClientIP(), "40.40.40.40") }