mirror of
https://github.com/labstack/echo.git
synced 2025-07-03 00:56:59 +02:00
Proper header and MIME constants
Signed-off-by: Vishal Rana <vr@labstack.com>
This commit is contained in:
@ -63,14 +63,14 @@ func TestLoggerIPAddress(t *testing.T) {
|
||||
})
|
||||
|
||||
// With X-Real-IP
|
||||
rq.Header().Add(echo.XRealIP, ip)
|
||||
rq.Header().Add(echo.HeaderXRealIP, ip)
|
||||
h(c)
|
||||
assert.Contains(t, ip, buf.String())
|
||||
|
||||
// With X-Forwarded-For
|
||||
buf.Reset()
|
||||
rq.Header().Del(echo.XRealIP)
|
||||
rq.Header().Add(echo.XForwardedFor, ip)
|
||||
rq.Header().Del(echo.HeaderXRealIP)
|
||||
rq.Header().Add(echo.HeaderXForwardedFor, ip)
|
||||
h(c)
|
||||
assert.Contains(t, ip, buf.String())
|
||||
|
||||
|
Reference in New Issue
Block a user