yeah is_loopback just doesn't catch IPv4 mapped stuff on anything pre 3.13 so i'd go with if not ip.is_global and call it a day
also keep redirects off, a 302 to 169.254.169.254 gets right past the check and people forget that part. shopify is fine with limit=250 but I stop on an empty page, not a short one, cause some stores randomly give you short pages in the middle