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

request help: real_ip_recursive for real-ip plugin #6602

Closed
tangzhenhuang opened this issue Mar 14, 2022 · 7 comments · Fixed by #6988
Closed

request help: real_ip_recursive for real-ip plugin #6602

tangzhenhuang opened this issue Mar 14, 2022 · 7 comments · Fixed by #6988
Assignees

Comments

@tangzhenhuang
Copy link
Contributor

Issue description

I found that there was once a PR about real_ip_recursive: #4332
But it seems that the real-ip plugin does not have recursive related configuration items. In fact, I looked at the real-ip code and it seems that there is no related implementation. Is there any other way to achieve it? The current scenario is to configure it in the global plugin. real-ip for dynamic modification, looking forward to reply, thanks!

Environment

  • apisix version (cmd: apisix version): latest
  • OS (cmd: uname -a):
  • OpenResty / Nginx version (cmd: nginx -V or openresty -V):
  • etcd version, if have (cmd: run curl http://127.0.0.1:9090/v1/server_info to get the info from server-info API):
  • apisix-dashboard version, if have:
  • the plugin runner version, if the issue is about a plugin runner (cmd: depended on the kind of runner):
  • luarocks version, if the issue is about installation (cmd: luarocks --version):
@tokers
Copy link
Contributor

tokers commented Mar 14, 2022

@crazyMonkey1995 I think it can be implemented in the real-ip plugin.

@tangzhenhuang
Copy link
Contributor Author

tangzhenhuang commented Mar 14, 2022

Am I missing something? But the logic here is just to return the last IP of XFF
image
@tokers

@tokers
Copy link
Contributor

tokers commented Mar 15, 2022

Am I missing something? But the logic here is just to return the last IP of XFF image @tokers

No, the current implementation of real-ip plugin is not totally same to the Nginx real-ip module. We may support the real_ip_header and real_ip_recursive settings.

@tangzhenhuang
Copy link
Contributor Author

Am I missing something? But the logic here is just to return the last IP of XFF image @tokers

No, the current implementation of real-ip plugin is not totally same to the Nginx real-ip module. We may support the real_ip_header and real_ip_recursive settings.

Ok, I misunderstood.

@tokers
Copy link
Contributor

tokers commented Mar 15, 2022

@crazyMonkey1995 Would you like to try it?

@tangzhenhuang
Copy link
Contributor Author

@crazyMonkey1995 Would you like to try it?

Okay, but maybe not so soon.

@tokers
Copy link
Contributor

tokers commented Mar 16, 2022

@crazyMonkey1995 Would you like to try it?

Okay, but maybe not so soon.

Thanks!

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.

2 participants