-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
feat(openlist): add PassIPToUpsteam to driver #1498
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
Conversation
Signed-off-by: MadDogOwner <xiaoran@xrgzs.top>
Signed-off-by: MadDogOwner <xiaoran@xrgzs.top>
| typeKey += "/" + ua | ||
| typeKeys = []string{typeKey} | ||
| } | ||
| if mode&driver.LinkCacheIP == 1 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里是不是可以考虑将
if mode&driver.LinkCacheIP == 1
if mode&driver.LinkCacheUA == 1
改为
if mode&driver.LinkCacheIP != 0
if mode&driver.LinkCacheUA != 0
应该需要支持同时开启IP和UA的情况吧
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
确实有问题
Description / 描述
当 「传递 IP 至上游」启用时,会将 IP 地址使用
X-Forwarded-For、X-Real-Ip请求头传递至上游,方便上游服务器获取/缓存直链。Motivation and Context / 背景
Relates to #1339
How Has This Been Tested? / 测试
TODO: 需要确定缓存key是否设置正确
Checklist / 检查清单
我已阅读 CONTRIBUTING 文档。
go fmtor prettier.我已使用
go fmt或 prettier 格式化提交的代码。我已为此 PR 添加了适当的标签(如无权限或需要的标签不存在,请在描述中说明,管理员将后续处理)。
我已在适当情况下使用"Request review"功能请求相关代码作者进行审查。
我已相应更新了相关仓库(若适用)。