Skip to content

Commit 401bc61

Browse files
committed
fix: allow regex resource names with all control behaviors
Previously, regex resource names were only allowed with CONTROL_BEHAVIOR_DEFAULT (fast failure). This restriction prevented users from using warm-up or queue behaviors with regex-matched resources. Now regex resource names can be used with any control behavior, as long as the rule is not in cluster mode. Fixes #3544
1 parent 1375ff9 commit 401bc61

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • sentinel-core/src/main/java/com/alibaba/csp/sentinel/slots/block/flow

sentinel-core/src/main/java/com/alibaba/csp/sentinel/slots/block/flow/FlowRuleUtil.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ private static boolean checkRegexField(FlowRule rule) {
246246
return false;
247247
}
248248
if (rule.isRegex()) {
249-
return !rule.isClusterMode() && rule.getControlBehavior() == RuleConstant.CONTROL_BEHAVIOR_DEFAULT;
249+
return !rule.isClusterMode();
250250
}
251251
return true;
252252
}

0 commit comments

Comments
 (0)