mirror of
https://github.com/TeaOSLab/EdgeNode.git
synced 2025-11-05 00:34:01 +08:00
地区封禁也可以使用自定义页面
This commit is contained in:
@@ -177,7 +177,8 @@ func (this *HTTPRequest) checkWAFRequest(firewallPolicy *firewallconfigs.HTTPFir
|
|||||||
if countryId > 0 && lists.ContainsInt64(regionConfig.DenyCountryIds, countryId) {
|
if countryId > 0 && lists.ContainsInt64(regionConfig.DenyCountryIds, countryId) {
|
||||||
this.firewallPolicyId = firewallPolicy.Id
|
this.firewallPolicyId = firewallPolicy.Id
|
||||||
|
|
||||||
this.writer.WriteHeader(http.StatusForbidden)
|
this.writeCode(http.StatusForbidden)
|
||||||
|
this.writer.Flush()
|
||||||
this.writer.Close()
|
this.writer.Close()
|
||||||
|
|
||||||
// 停止日志
|
// 停止日志
|
||||||
@@ -197,7 +198,8 @@ func (this *HTTPRequest) checkWAFRequest(firewallPolicy *firewallconfigs.HTTPFir
|
|||||||
if provinceId > 0 && lists.ContainsInt64(regionConfig.DenyProvinceIds, provinceId) {
|
if provinceId > 0 && lists.ContainsInt64(regionConfig.DenyProvinceIds, provinceId) {
|
||||||
this.firewallPolicyId = firewallPolicy.Id
|
this.firewallPolicyId = firewallPolicy.Id
|
||||||
|
|
||||||
this.writer.WriteHeader(http.StatusForbidden)
|
this.writeCode(http.StatusForbidden)
|
||||||
|
this.writer.Flush()
|
||||||
this.writer.Close()
|
this.writer.Close()
|
||||||
|
|
||||||
// 停止日志
|
// 停止日志
|
||||||
|
|||||||
Reference in New Issue
Block a user