diff --git a/web/public/js/components/server/http-cache-ref-box.js b/web/public/js/components/server/http-cache-ref-box.js index 0e8f7419..bb7fb2ec 100644 --- a/web/public/js/components/server/http-cache-ref-box.js +++ b/web/public/js/components/server/http-cache-ref-box.js @@ -179,10 +179,11 @@ Vue.component("http-cache-ref-box", { diff --git a/web/public/js/components/server/http-cond-definitions.js b/web/public/js/components/server/http-cond-definitions.js index 2566fb95..9a21c6bf 100644 --- a/web/public/js/components/server/http-cond-definitions.js +++ b/web/public/js/components/server/http-cond-definitions.js @@ -438,6 +438,38 @@ Vue.component("http-cond-url-not-regexp", { ` }) +// URL通配符 +Vue.component("http-cond-url-wildcard-match", { + props: ["v-cond"], + mounted: function () { + this.$refs.valueInput.focus() + }, + data: function () { + let cond = { + isRequest: true, + param: "${requestPath}", + operator: "wildcard match", + value: "", + isCaseInsensitive: false + } + if (this.vCond != null && typeof this.vCond.value == "string") { + cond.value = this.vCond.value + } + return { + cond: cond + } + }, + methods: { + changeCaseInsensitive: function (isCaseInsensitive) { + this.cond.isCaseInsensitive = isCaseInsensitive + } + }, + template: `
+ + +

匹配URL的通配符,用星号(*)表示任意字符,比如(/images/*.png/static/*,不需要带域名。

+
` +}) // User-Agent正则匹配 Vue.component("http-cond-user-agent-regexp", { diff --git a/web/public/js/conds/official.json b/web/public/js/conds/official.json index a76a63af..0de75a65 100644 --- a/web/public/js/conds/official.json +++ b/web/public/js/conds/official.json @@ -52,6 +52,15 @@ "isRequest": true, "caseInsensitive": true }, + { + "type": "url-wildcard-match", + "name": "URL通配符", + "description": "使用通配符检查URL中的文件路径是否一致", + "component": "http-cond-url-wildcard-match", + "paramsTitle": "通配符", + "isRequest": true, + "caseInsensitive": true + }, { "type": "user-agent-regexp", "name": "User-Agent正则匹配",