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

Better way to obtain the real IP #1452

Closed
chatoo2412 opened this issue Nov 21, 2019 · 3 comments
Closed

Better way to obtain the real IP #1452

chatoo2412 opened this issue Nov 21, 2019 · 3 comments

Comments

@chatoo2412
Copy link

app.maxIpsCount option was added recently.
But it still has a potential problem because proxies between client and server can be dynamic.
IMO, ngx_http_realip_module suggests a better way.
It accepts whitelist and returns the last non-trusted IP.
Please consider implementing a same option in koa.

@antixrist
Copy link

Maybe it makes sense to use a proxy-addr for this purpose?

@jonathanong jonathanong transferred this issue from koajs/koa Apr 28, 2020
@jonathanong jonathanong transferred this issue from koajs/discussions Apr 28, 2020
@jonathanong
Copy link
Member

yes, proxy-addr is the correct solution.

@jonathanong
Copy link
Member

#281

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

No branches or pull requests

3 participants