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

This commit is contained in:
刘祥超
2022-12-18 16:04:12 +08:00
parent 5cf84efccd
commit b942bb776e

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 {