Open 2011aad opened 2 weeks ago
Describe the bug
ClientIP()方法注释是说:
// ClientIP tries to parse the headers in [X-Real-Ip, X-Forwarded-For]. // It calls RemoteIP() under the hood. If it cannot satisfy the requirements, // use engine.SetClientIPFunc to inject your own implementation.
但实际的default方法的代码逻辑是先读X-Forwarded-For,再读X-Real-Ip,这个注释有点误导哎。
Describe the bug
ClientIP()方法注释是说:
// ClientIP tries to parse the headers in [X-Real-Ip, X-Forwarded-For]. // It calls RemoteIP() under the hood. If it cannot satisfy the requirements, // use engine.SetClientIPFunc to inject your own implementation.
但实际的default方法的代码逻辑是先读X-Forwarded-For,再读X-Real-Ip,这个注释有点误导哎。