fix header iteration on /ip
This commit is contained in:
2
app.py
2
app.py
@@ -85,7 +85,7 @@ def ip_lookup():
|
||||
d = jf(b) or {}
|
||||
hdrs = {k: v for k, v in request.headers.items() if k.lower() in
|
||||
("user-agent","accept-language","x-forwarded-for","cf-connecting-ip","cf-ipcountry","x-real-ip")}
|
||||
proxy_hint = any(k.lower().startswith(("x-forwarded","via","proxy")) for k in request.headers)
|
||||
proxy_hint = any(k.lower().startswith(("x-forwarded","via","proxy")) for k in request.headers.keys())
|
||||
rows = [
|
||||
("YOUR IP", f"<b style='font-size:1.3rem;color:var(--acc)'>{d.get('query', ip)}</b>"),
|
||||
("Country", f"{d.get('country','?')} ({d.get('countryCode','?')}) 🏴 {d.get('flag') if 'flag' in d else ''}".strip()),
|
||||
|
||||
Reference in New Issue
Block a user