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
feat: support config.maxIpsCount #4014
Conversation
* @member {Integer} Config#maxIpsCount | ||
* @default | ||
* @since 2.25.0 | ||
*/ |
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.
之前的实现其实有问题,配置替换成和 koa 的一致。
app/extend/request.js
Outdated
// Compatible with maxProxyCount logic (previous logic is wrong, only for compatibility with legacy logic) | ||
if (!maxIpsCount && this.app.config.maxProxyCount) maxIpsCount = this.app.config.maxProxyCount + 1; | ||
|
||
if (maxIpsCount) { |
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.
判断 maxIpsCount > 0
Codecov Report
@@ Coverage Diff @@
## master #4014 +/- ##
======================================
Coverage 100% 100%
======================================
Files 34 34
Lines 945 947 +2
======================================
+ Hits 945 947 +2
Continue to review full report at Codecov.
|
feat: support config.maxIpsCount (#4014)
Checklist
npm test
passesAffected core subsystem(s)
Description of change