Vue.component("http-firewall-config-box", { props: ["v-firewall-config", "v-is-location", "v-is-group", "v-firewall-policy"], data: function () { let firewall = this.vFirewallConfig if (firewall == null) { firewall = { isPrior: false, isOn: false, firewallPolicyId: 0, ignoreGlobalRules: false, defaultCaptchaType: "none" } } if (firewall.defaultCaptchaType == null || firewall.defaultCaptchaType.length == 0) { firewall.defaultCaptchaType = "none" } let allCaptchaTypes = window.WAF_CAPTCHA_TYPES.$copy() // geetest let geeTestIsOn = false if (this.vFirewallPolicy != null && this.vFirewallPolicy.captchaAction != null && this.vFirewallPolicy.captchaAction.geeTestConfig != null) { geeTestIsOn = this.vFirewallPolicy.captchaAction.geeTestConfig.isOn } // 如果没有启用geetest,则还原 if (!geeTestIsOn && firewall.defaultCaptchaType == "geetest") { firewall.defaultCaptchaType = "none" } return { firewall: firewall, moreOptionsVisible: false, execGlobalRules: !firewall.ignoreGlobalRules, captchaTypes: allCaptchaTypes, geeTestIsOn: geeTestIsOn } }, watch: { execGlobalRules: function (v) { this.firewall.ignoreGlobalRules = !v } }, methods: { changeOptionsVisible: function (v) { this.moreOptionsVisible = v } }, template: `
| 全局WAF策略 |
{{vFirewallPolicy.name}} [{{vFirewallPolicy.modeInfo.name}}]
当前集群没有设置WAF策略,当前配置无法生效。
当前网站所在集群的设置。 |
| 启用Web防火墙 |
选中后,表示启用当前网站的WAF功能。 |
| 人机识别验证方式 |
使用系统默认的设置。你需要在入站规则中添加规则集来决定哪些请求需要人机识别验证。 {{captchaType.description}}你需要在入站规则中添加规则集来决定哪些请求需要人机识别验证。 |
| 启用系统全局规则 |
选中后,表示使用系统全局WAF策略中定义的规则。 |