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

Add mechanism for obtaining sockaddr for remote client in HTTP server #1868

Open
gdamore opened this issue Sep 7, 2024 Discussed in #1856 · 0 comments
Open

Add mechanism for obtaining sockaddr for remote client in HTTP server #1868

gdamore opened this issue Sep 7, 2024 Discussed in #1856 · 0 comments

Comments

@gdamore
Copy link
Contributor

gdamore commented Sep 7, 2024

Discussed in #1856

Originally posted by nanji886 August 4, 2024
Sometimes when a request is received in the HTTP server, it needs to respond differently depending on the remote client IP. Therefore, it is very meaningful to add the function of obtaining the client's IP for the HTTP server.

Basically we should probably add an nng_sockaddr member to the http_request object. This can be useful in a variety of circumstances. It won't be useful on the client, but it would be useful to make it available to handlers.

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

1 participant