瀏覽代碼

always set fqdn so that remove operation works

tags/v0.10.5
Jonathan Cobb 4 年之前
父節點
當前提交
e7404c8a2d
共有 1 個檔案被更改,包括 2 行新增3 行删除
  1. +2
    -3
      bubble-server/src/main/java/bubble/rule/passthru/TlsPassthruConfig.java

+ 2
- 3
bubble-server/src/main/java/bubble/rule/passthru/TlsPassthruConfig.java 查看文件

@@ -69,15 +69,14 @@ public class TlsPassthruConfig {
return !empty(feedList) ? Arrays.stream(feedList).collect(Collectors.toCollection(TreeSet::new)) : Collections.emptySet(); return !empty(feedList) ? Arrays.stream(feedList).collect(Collectors.toCollection(TreeSet::new)) : Collections.emptySet();
} }


private class TlsPassthruMatcher {
private static class TlsPassthruMatcher {
@Getter @Setter private String fqdn; @Getter @Setter private String fqdn;
@Getter @Setter private Pattern fqdnPattern; @Getter @Setter private Pattern fqdnPattern;
public boolean hasPattern () { return fqdnPattern != null; } public boolean hasPattern () { return fqdnPattern != null; }
public TlsPassthruMatcher (String fqdn) { public TlsPassthruMatcher (String fqdn) {
this.fqdn = fqdn;
if (fqdn.startsWith("/") && fqdn.endsWith("/")) { if (fqdn.startsWith("/") && fqdn.endsWith("/")) {
this.fqdnPattern = Pattern.compile(fqdn.substring(1, fqdn.length()-1), Pattern.CASE_INSENSITIVE); this.fqdnPattern = Pattern.compile(fqdn.substring(1, fqdn.length()-1), Pattern.CASE_INSENSITIVE);
} else {
this.fqdn = fqdn;
} }
} }
public boolean matches (String val) { public boolean matches (String val) {


Loading…
取消
儲存