国家/地区封禁、省份封禁时支持IP变量

This commit is contained in:
GoEdgeLab
2022-12-18 16:04:12 +08:00
parent 15c658d303
commit 9c26ea80cc

View File

@@ -1133,6 +1133,8 @@ func (this *HTTPRequest) requestRemoteAddr(supportVar bool) string {
// 获取请求的客户端地址列表
func (this *HTTPRequest) requestRemoteAddrs() (result []string) {
result = append(result, this.requestRemoteAddr(true))
// X-Forwarded-For
var forwardedFor = this.RawReq.Header.Get("X-Forwarded-For")
if len(forwardedFor) > 0 {