WAF区域封禁增加文字提示

This commit is contained in:
GoEdgeLab
2023-05-27 20:32:03 +08:00
parent bcb69f1240
commit b86b2c80a6

View File

@@ -175,7 +175,7 @@ func (this *HTTPRequest) checkWAFRequest(firewallPolicy *firewallconfigs.HTTPFir
if countryId > 0 && lists.ContainsInt64(regionConfig.DenyCountryIds, countryId) {
this.firewallPolicyId = firewallPolicy.Id
this.writeCode(http.StatusForbidden, "", "")
this.writeCode(http.StatusForbidden, "The region has been denied.", "当前区域禁止访问")
this.writer.Flush()
this.writer.Close()
@@ -196,7 +196,7 @@ func (this *HTTPRequest) checkWAFRequest(firewallPolicy *firewallconfigs.HTTPFir
if provinceId > 0 && lists.ContainsInt64(regionConfig.DenyProvinceIds, provinceId) {
this.firewallPolicyId = firewallPolicy.Id
this.writeCode(http.StatusForbidden, "", "")
this.writeCode(http.StatusForbidden, "The region has been denied.", "当前区域禁止访问")
this.writer.Flush()
this.writer.Close()