Searched through docs and read source, could not find anyway to access something like
ctx.Request.Header.Get("X-Forwarded-For")
I see in header.go
, the type RequestHeader struct
is defined something like
h []argsKV
bufKV argsKV
cookies []argsKV
rawHeaders []byte
Is it possible to access these fields without reflection at all?
Found it.
ctx.Request.Header.Peek("X-Forwarded-For")