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 optional IP selection handler #8

Closed
UmanShahzad opened this issue Oct 30, 2020 · 1 comment · Fixed by #39
Closed

Add optional IP selection handler #8

UmanShahzad opened this issue Oct 30, 2020 · 1 comment · Fixed by #39

Comments

@UmanShahzad
Copy link
Contributor

UmanShahzad commented Oct 30, 2020

Add an optional IP selection handler to the SDK client initialization step which accepts the request context and expects returning an IP.

The default handler, if no handler is specified by the user, will simply return the IP attached to the request object.

An additional handler should be available within the library, which looks into the X-Forwarded-For header and gets the first IP in the list if it exists, falling back to the IP attached to the request if the header isn't available. This is an implementation that users can optionally use instead of making their own.

@UmanShahzad
Copy link
Contributor Author

Released in v2.4.0.

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

Successfully merging a pull request may close this issue.

1 participant