@@ -3545,14 +3551,14 @@ Vue.component("http-cache-config-box", {
- | PURGE Key * |
+ PURGE Key * |
@@ -3561,7 +3567,12 @@ Vue.component("http-cache-config-box", {
-
+
+ 过时缓存策略
+
+
+
+
缓存条件
@@ -4587,6 +4598,68 @@ Vue.component("server-name-box", {
`
})
+Vue.component("http-cache-stale-config", {
+ props: ["v-cache-stale-config"],
+ data: function () {
+ let config = this.vCacheStaleConfig
+ if (config == null) {
+ config = {
+ isPrior: false,
+ isOn: false,
+ status: [],
+ supportStaleIfErrorHeader: true,
+ life: {
+ count: 1,
+ unit: "day"
+ }
+ }
+ }
+ return {
+ config: config
+ }
+ },
+ watch: {
+ config: {
+ deep: true,
+ handler: function () {
+ this.$emit("change", this.config)
+ }
+ }
+ },
+ methods: {},
+ template: `
+
+
+ | 启用过时缓存 |
+
+
+
+ |
+
+
+ | 有效期 |
+
+
+
+ |
+
+
+ | 状态码 |
+
+
+ |
+
+
+ | 支持stale-if-error |
+
+
+
+ |
+
+
+ `
+})
+
// 域名列表
Vue.component("domains-box", {
props: ["v-domains"],
@@ -6694,7 +6767,7 @@ Vue.component("http-access-log-box", {
template: `
[{{accessLog.node.name}}节点]
[服务]
- [{{accessLog.region}}] {{accessLog.remoteAddr}} [{{accessLog.timeLocal}}] "{{accessLog.requestMethod}} {{accessLog.scheme}}://{{accessLog.host}}{{accessLog.requestURI}} {{accessLog.proto}}" {{accessLog.status}} cache hit waf {{accessLog.firewallActions}} - {{tag}} - 耗时:{{formatCost(accessLog.requestTime)}} ms ({{accessLog.humanTime}})
+ [{{accessLog.region}}] {{accessLog.remoteAddr}} [{{accessLog.timeLocal}}] "{{accessLog.requestMethod}} {{accessLog.scheme}}://{{accessLog.host}}{{accessLog.requestURI}} {{accessLog.proto}}" {{accessLog.status}} cache {{accessLog.attrs['cache.status'].toLowerCase()}} waf {{accessLog.firewallActions}} - {{tag}} - 耗时:{{formatCost(accessLog.requestTime)}} ms ({{accessLog.humanTime}})
`
})
diff --git a/web/public/js/components/server/http-cache-config-box.js b/web/public/js/components/server/http-cache-config-box.js
index 88117d34..7a3aaa06 100644
--- a/web/public/js/components/server/http-cache-config-box.js
+++ b/web/public/js/components/server/http-cache-config-box.js
@@ -117,7 +117,7 @@ Vue.component("http-cache-config-box", {
- 陈旧缓存策略
+ 过时缓存策略
diff --git a/web/public/js/components/server/http-cache-stale-config.js b/web/public/js/components/server/http-cache-stale-config.js
index 4a5abdaf..3a5167c8 100644
--- a/web/public/js/components/server/http-cache-stale-config.js
+++ b/web/public/js/components/server/http-cache-stale-config.js
@@ -30,10 +30,10 @@ Vue.component("http-cache-stale-config", {
template: `
- | 启用陈旧缓存 |
+ 启用过时缓存 |
-
+
|
@@ -46,14 +46,14 @@ Vue.component("http-cache-stale-config", {
| 状态码 |
-
+
|
| 支持stale-if-error |
-
+
|
diff --git a/web/views/@default/@layout.html b/web/views/@default/@layout.html
index 8a5ec53e..5b255ef7 100644
--- a/web/views/@default/@layout.html
+++ b/web/views/@default/@layout.html
@@ -122,8 +122,8 @@
官网
文档
GitHub
-
+
提Bug
QQ讨论群:659832182
企业版
diff --git a/web/views/@default/servers/server/settings/fastcgi/createPopup.html b/web/views/@default/servers/server/settings/fastcgi/createPopup.html
index 07c413df..d05a32ec 100644
--- a/web/views/@default/servers/server/settings/fastcgi/createPopup.html
+++ b/web/views/@default/servers/server/settings/fastcgi/createPopup.html
@@ -31,7 +31,7 @@
-
+
diff --git a/web/views/@default/servers/server/settings/fastcgi/updatePopup.html b/web/views/@default/servers/server/settings/fastcgi/updatePopup.html
index efe78a3b..0a4e2875 100644
--- a/web/views/@default/servers/server/settings/fastcgi/updatePopup.html
+++ b/web/views/@default/servers/server/settings/fastcgi/updatePopup.html
@@ -32,7 +32,7 @@
-
+
diff --git a/web/views/@default/servers/server/settings/rewrite/createPopup.html b/web/views/@default/servers/server/settings/rewrite/createPopup.html
index e3aa9b21..060fbc6e 100644
--- a/web/views/@default/servers/server/settings/rewrite/createPopup.html
+++ b/web/views/@default/servers/server/settings/rewrite/createPopup.html
@@ -8,14 +8,14 @@
匹配规则 * |
-
+
|
| 目标URL * |
-
+
|
@@ -49,7 +49,7 @@
| 代理主机名 |
-
+
|
diff --git a/web/views/@default/servers/server/settings/rewrite/updatePopup.html b/web/views/@default/servers/server/settings/rewrite/updatePopup.html
index 34884aa3..1aa782c5 100644
--- a/web/views/@default/servers/server/settings/rewrite/updatePopup.html
+++ b/web/views/@default/servers/server/settings/rewrite/updatePopup.html
@@ -9,14 +9,14 @@
| 匹配规则 * |
-
+
|
| 目标URL * |
-
+
|
@@ -50,7 +50,7 @@
| 代理主机名 |
-
+
|
|