From 837bf25f7bf6129d736e06a78bd36190393a3854 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E7=A5=A5=E8=B6=85?= Date: Fri, 30 Dec 2022 12:04:17 +0800 Subject: [PATCH] =?UTF-8?q?=E5=86=85=E5=AE=B9=E5=8E=8B=E7=BC=A9=E6=94=AF?= =?UTF-8?q?=E6=8C=81=E4=BE=8B=E5=A4=96=E6=89=A9=E5=B1=95=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../server/http-compression-config-box.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/web/public/js/components/server/http-compression-config-box.js b/web/public/js/components/server/http-compression-config-box.js index 312f0c5c..74e608ca 100644 --- a/web/public/js/components/server/http-compression-config-box.js +++ b/web/public/js/components/server/http-compression-config-box.js @@ -24,6 +24,7 @@ Vue.component("http-compression-config-box", { maxLength: {count: 0, "unit": "kb"}, mimeTypes: ["text/*", "application/javascript", "application/json", "application/atom+xml", "application/rss+xml", "application/xhtml+xml", "font/*", "image/svg+xml"], extensions: [".js", ".json", ".html", ".htm", ".xml", ".css", ".woff2", ".txt"], + exceptExtensions: [".apk", ".ipa"], conds: null, enablePartialContent: false } @@ -109,6 +110,14 @@ Vue.component("http-compression-config-box", { }) this.config.extensions = values }, + changeExceptExtensions: function (values) { + values.forEach(function (v, k) { + if (v.length > 0 && v[0] != ".") { + values[k] = "." + v + } + }) + this.config.exceptExtensions = values + }, changeMimeTypes: function (values) { this.config.mimeTypes = values }, @@ -180,6 +189,13 @@ Vue.component("http-compression-config-box", {

含有这些扩展名的URL将会被压缩,不区分大小写。

+ + 例外扩展名 + + +

含有这些扩展名的URL将不会被压缩,不区分大小写。

+ + 支持的MimeType