fix: check local ip for 123pan

This commit is contained in:
Xhofe
2022-03-15 14:48:39 +08:00
parent 5a1b16a601
commit ef19e851e3
2 changed files with 29 additions and 1 deletions

View File

@ -140,7 +140,7 @@ func (driver Pan123) Link(args base.Args, account *model.Account) (*base.Link, e
}
var resp Pan123DownResp
var headers map[string]string
if args.IP != "" && args.IP != "::1" {
if !utils.IsLocalIPAddr(args.IP) {
headers = map[string]string{
//"X-Real-IP": "1.1.1.1",
"X-Forwarded-For": args.IP,