Doc: fix script example error (#2876)

This commit is contained in:
luojia 2023-08-13 20:29:05 +08:00 committed by GitHub
parent ac3fd60d54
commit e5668687ab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -18,9 +18,10 @@ mode: Script
script:
code: |
def main(ctx, metadata):
ip = metadata["dst_ip"] = ctx.resolve_ip(metadata["host"])
ip = ctx.resolve_ip(metadata["host"])
if ip == "":
return "DIRECT"
metadata["dst_ip"] = ip
code = ctx.geoip(ip)
if code == "LAN" or code == "CN":