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")
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With