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

[建议] 支持将源 IP 设置到特定header中,向上游服务器传输 #865

Open
R0A1NG opened this issue May 6, 2024 · 3 comments
Labels
enhancement New feature or request

Comments

@R0A1NG
Copy link

R0A1NG commented May 6, 2024

背景与遇到的问题

将真实客户端IP以自定义header头的形式发送给内网服务器,而不是默认在X-Forwarded-For增加真实IP

建议的解决方案

No response

@Lorna0
Copy link
Collaborator

Lorna0 commented May 6, 2024

具体背景与遇到的问题?
内网服务器不支持解析么

@R0A1NG
Copy link
Author

R0A1NG commented May 6, 2024

具体背景与遇到的问题? 内网服务器不支持解析么

是的,现在内网的X-Forwarded-For只获取第一个,内网部分位置没法改代码获取IP。最好自定义一个header来单独放真实IP

@Lorna0 Lorna0 added enhancement New feature or request and removed need more information labels May 7, 2024
@Lorna0
Copy link
Collaborator

Lorna0 commented May 7, 2024

临时解决方法:参考官网文档的自定义 nginx conf,在站点的后台 conf 中增加一个 proxy_set_header

@Lorna0 Lorna0 changed the title [建议] 增加真实IP传输功能 [建议] 支持将源 IP 设置到特定header中,向上游服务器传输 May 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants