-
Notifications
You must be signed in to change notification settings - Fork 800
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
feature: URL prefix case-sensitive #1637
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1637 +/- ##
==========================================
+ Coverage 59.22% 59.41% +0.18%
==========================================
Files 369 369
Lines 28665 28669 +4
==========================================
+ Hits 16978 17034 +56
+ Misses 9760 9714 -46
+ Partials 1927 1921 -6
Continue to review full report at Codecov.
|
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.
LGTM
@@ -69,7 +70,11 @@ func newPrefixMatcher(rule *jwtauthnv3.RequirementRule) Matcher { | |||
} | |||
|
|||
func (p *prefixMatcher) Matches(headers api.HeaderMap, requestPath string) bool { | |||
if p.baseMatcher.matchRoutes(headers, requestPath) && strings.HasPrefix(requestPath, p.prefix) { | |||
prefixMatch := strings.HasPrefix(requestPath, p.prefix) | |||
if !p.baseMatcher.caseSensitive { |
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.
这里是不是有重复计算。 先判断caseSensitive?
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.
ok
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.
LGTM
Issues associated with this PR
#1633
Solutions
make the configuration 'case_sensitive' work.