Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
通过文档搜索并阅读源代码,无论如何都找不到访问类似的东西
ctx.Request.Header.Get("X-Forwarded-For")
我在 中看到header.go,它type RequestHeader struct被定义为
header.go
type RequestHeader struct
h []argsKV bufKV argsKV cookies []argsKV rawHeaders []byte
是否可以完全不反射地访问这些字段?
找到了。
ctx.Request.Header.Peek("X-Forwarded-For")