From 64454513b32cdb4ebe426e3c4abc03ae9ec9082a Mon Sep 17 00:00:00 2001 From: GoEdgeLab Date: Wed, 12 May 2021 16:05:18 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BC=93=E5=AD=98=E5=8C=B9=E9=85=8D=E6=9D=A1?= =?UTF-8?q?=E4=BB=B6=E5=A2=9E=E5=8A=A0=E2=80=9C=E6=8E=92=E9=99=A4URL?= =?UTF-8?q?=E6=AD=A3=E5=88=99=E5=8C=B9=E9=85=8D=E2=80=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../server/http-cond-definitions.js | 22 +++++++++++++++++++ web/public/js/conds/official.json | 7 ++++++ 2 files changed, 29 insertions(+) diff --git a/web/public/js/components/server/http-cond-definitions.js b/web/public/js/components/server/http-cond-definitions.js index 69dd04db..114da667 100644 --- a/web/public/js/components/server/http-cond-definitions.js +++ b/web/public/js/components/server/http-cond-definitions.js @@ -148,6 +148,28 @@ Vue.component("http-cond-url-regexp", { ` }) +// 排除URL正则匹配 +Vue.component("http-cond-url-not-regexp", { + props: ["v-cond"], + data: function () { + let cond = this.vCond + if (cond == null) { + cond = { + isRequest: true, + param: "${requestPath}", + operator: "not regexp", + value: "" + } + } + return { + cond: cond + } + }, + template: `
+ + +
` +}) // 根据MimeType Vue.component("http-cond-mime-type", { diff --git a/web/public/js/conds/official.json b/web/public/js/conds/official.json index ef0857b0..232970ad 100644 --- a/web/public/js/conds/official.json +++ b/web/public/js/conds/official.json @@ -27,6 +27,13 @@ "component": "http-cond-url-regexp", "isRequest": true }, + { + "type": "url-not-regexp", + "name": "排除URL正则匹配", + "description": "使用正则表达式检查URL中的文件路径是否一致,如果一致,则不匹配", + "component": "http-cond-url-not-regexp", + "isRequest": true + }, { "type": "mime-type", "name": "内容MimeType",