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

[Feature Request] Support get client ip by MetaExtractor #602

Open
jolestar opened this issue Dec 16, 2020 · 4 comments
Open

[Feature Request] Support get client ip by MetaExtractor #602

jolestar opened this issue Dec 16, 2020 · 4 comments

Comments

@jolestar
Copy link

The server needs to know the client IP in some cases, such as rate limit, add permission controller by IP, etc.

@tomusdrw
Copy link
Contributor

Which transport do you mean? It's just a matter of exposing things in the RequestContext of specific server implementation, like here:

pub struct RequestContext {

@jolestar
Copy link
Author

Http & Websocket, tcp transport can get SocketAddr from context

@ghostant-1017
Copy link

Did you solve this problem? @jolestar

@jolestar
Copy link
Author

Did you solve this problem? @jolestar

We now get the IP address from HTTP Header.

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

No branches or pull requests

3 participants