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

How to get the IP of a web page visitor #3386

Closed
LeeYuze opened this issue Nov 8, 2018 · 3 comments
Closed

How to get the IP of a web page visitor #3386

LeeYuze opened this issue Nov 8, 2018 · 3 comments

Comments

@LeeYuze
Copy link

LeeYuze commented Nov 8, 2018

My English is not good. I hope you can give the code directly. If someone visits the website I built with aiohttp, how can I get his IP address?
还有如何限制一个IP访问多次

@aio-libs-bot
Copy link

GitMate.io thinks the contributor most likely able to help you is @asvetlov.

Possibly related issues are #642 (Ability to get remote IP from a request), #469 (how to get the post data), #2566 (how to get post data), #1692 (Can we get the response time?), and #715 (How to test aiohttp.web applications).

@asvetlov
Copy link
Member

asvetlov commented Nov 8, 2018

request.remote.
Please use https://github.com/aio-libs/aiohttp-remotes if an aiohttp application is deployed behind a reverse proxy.

@asvetlov asvetlov closed this as completed Nov 8, 2018
@lock
Copy link

lock bot commented Nov 8, 2019

This thread has been automatically locked since there has not been
any recent activity after it was closed. Please open a new issue for
related bugs.

If you feel like there's important points made in this discussion,
please include those exceprts into that new issue.

@lock lock bot added the outdated label Nov 8, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Nov 8, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants