@@ -4100,7 +4118,8 @@ Vue.component("traffic-map-box",{props:["v-stats","v-is-attack"],mounted:functio
- {{rule.checkpointOptions.allowDomains}}
+ 允许{{rule.checkpointOptions.allowDomains}}
+ 禁止{{rule.checkpointOptions.denyDomains}}
diff --git a/web/public/js/components.src.js b/web/public/js/components.src.js
index c0f30d9e..be85b788 100755
--- a/web/public/js/components.src.js
+++ b/web/public/js/components.src.js
@@ -4158,7 +4158,6 @@ Vue.component("http-firewall-rule-label", {
},
methods: {
showErr: function (err) {
-
teaweb.popupTip("规则校验错误,请修正:" + teaweb.encodeHTML(err) + "")
},
@@ -4174,7 +4173,8 @@ Vue.component("http-firewall-rule-label", {
- {{rule.checkpointOptions.allowDomains}}
+ 允许{{rule.checkpointOptions.allowDomains}}
+ 禁止{{rule.checkpointOptions.denyDomains}}
@@ -5975,6 +5975,7 @@ Vue.component("http-firewall-checkpoint-referer-block", {
let allowEmpty = true
let allowSameDomain = true
let allowDomains = []
+ let denyDomains = []
let options = {}
if (window.parent.UPDATING_RULE != null) {
@@ -5993,6 +5994,9 @@ Vue.component("http-firewall-checkpoint-referer-block", {
if (options.allowDomains != null && typeof (options.allowDomains) == "object") {
allowDomains = options.allowDomains
}
+ if (options.denyDomains != null && typeof (options.denyDomains) == "object") {
+ denyDomains = options.denyDomains
+ }
let that = this
setTimeout(function () {
@@ -6003,6 +6007,7 @@ Vue.component("http-firewall-checkpoint-referer-block", {
allowEmpty: allowEmpty,
allowSameDomain: allowSameDomain,
allowDomains: allowDomains,
+ denyDomains: denyDomains,
options: {},
value: 0
}
@@ -6020,6 +6025,10 @@ Vue.component("http-firewall-checkpoint-referer-block", {
this.allowDomains = values
this.change()
},
+ changeDenyDomains: function (values) {
+ this.denyDomains = values
+ this.change()
+ },
change: function () {
this.vCheckpoint.options = [
{
@@ -6033,7 +6042,11 @@ Vue.component("http-firewall-checkpoint-referer-block", {
{
code: "allowDomains",
value: this.allowDomains
- }
+ },
+ {
+ code: "denyDomains",
+ value: this.denyDomains
+ },
]
}
},
@@ -6062,6 +6075,13 @@ Vue.component("http-firewall-checkpoint-referer-block", {
+
+ | 禁止的来源域名 |
+
+
+
+ |
+
`
})
@@ -7101,12 +7121,16 @@ Vue.component("http-referers-config-box", {
isOn: false,
allowEmpty: true,
allowSameDomain: true,
- allowDomains: []
+ allowDomains: [],
+ denyDomains: []
}
}
if (config.allowDomains == null) {
config.allowDomains = []
}
+ if (config.denyDomains == null) {
+ config.denyDomains = []
+ }
return {
config: config
}
@@ -7116,6 +7140,8 @@ Vue.component("http-referers-config-box", {
return ((!this.vIsLocation && !this.vIsGroup) || this.config.isPrior) && this.config.isOn
},
changeAllowDomains: function (domains) {
+ },
+ changeDenyDomains: function (domains) {
}
},
template: `
@@ -7156,6 +7182,13 @@ Vue.component("http-referers-config-box", {
+
+ | 禁止的来源域名 |
+
+
+
+ |
+
@@ -11580,6 +11613,51 @@ Vue.component("http-request-cond-view", {
`
})
+Vue.component("http-header-assistant", {
+ props: ["v-type", "v-value"],
+ mounted: function () {
+ let that = this
+ Tea.action("/servers/headers/options?type=" + this.vType)
+ .post()
+ .success(function (resp) {
+ that.allHeaders = resp.data.headers
+ })
+ },
+ data: function () {
+ return {
+ allHeaders: [],
+ matchedHeaders: [],
+
+ selectedHeaderName: ""
+ }
+ },
+ watch: {
+ vValue: function (v) {
+ if (v != this.selectedHeaderName) {
+ this.selectedHeaderName = ""
+ }
+
+ if (v.length == 0) {
+ this.matchedHeaders = []
+ return
+ }
+ this.matchedHeaders = this.allHeaders.filter(function (header) {
+ return teaweb.match(header, v)
+ }).slice(0, 5)
+ }
+ },
+ methods: {
+ select: function (header) {
+ this.$emit("select", header)
+ this.selectedHeaderName = header
+ }
+ },
+ template: `
+ {{header}}
+
+`
+})
+
Vue.component("http-firewall-rules-box", {
props: ["v-rules", "v-type"],
data: function () {
@@ -11630,7 +11708,8 @@ Vue.component("http-firewall-rules-box", {
- {{rule.checkpointOptions.allowDomains}}
+ 允许{{rule.checkpointOptions.allowDomains}}
+ 禁止{{rule.checkpointOptions.denyDomains}}