Commit a682f847 authored by libin's avatar libin

权限路径匹配

parent 40b1f221
......@@ -169,7 +169,7 @@ public class AccessGatewayFilter implements GlobalFilter {
public boolean test(PermissionInfo permissionInfo) {
String uri = permissionInfo.getUri();
if (uri.indexOf("{") > 0) {
uri = uri.replaceAll("\\{\\*\\}", "[a-zA-Z\\\\d]+");
uri = uri.replaceAll("\\{\\*\\}", "[a-zA-Z-\\\\d]+");
}
String regEx = "^" + uri + "$";
return (Pattern.compile(regEx).matcher(requestUri).find())
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment