Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ClientIP()方法注释有误 #1209

Open
2011aad opened this issue Oct 12, 2024 · 0 comments
Open

ClientIP()方法注释有误 #1209

2011aad opened this issue Oct 12, 2024 · 0 comments

Comments

@2011aad
Copy link

2011aad commented Oct 12, 2024

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,这个注释有点误导哎。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant