The app could already get the AS number and country in X-Client-ASN and X-Client-Country, but only with SWW_WAF_ADD_LOOKUP_HEADERS=true. The PR makes true the default. The cost: with the default lookup source, GeoJS, a new client's first request waits for GeoJS's answer, up to 800 ms. Later requests from that client do not wait.
What else is easy and available:
Already looked up, nothing new to fetch:
the AS name, such as Hetzner Online GmbH, which both GeoJS and the IPinfo file give;
the tags waf gave the request, such as torexit, abuseipdb or a DNS blocklist's tag;
the client address waf settled on, which today the app must work out from X-Forwarded-For itself.
One more field read per answer:
both sources give the country name and the continent;
only GeoJS gives city, region, time zone and latitude and longitude, so these would be missing with the IPinfo file.
Question: add any of these as headers to the app?
AS name only (recommended): one more header, X-Client-AS-Name. Both sources have it, and it is already kept with each answer. The catch: some AS names hold non-ASCII letters, which a header cannot carry as they are.
AS name, tags and client address: three headers, all from what waf already knows.
None: AS number and country only, as the PR does.
Model: opus-5-5
PR: https://git.eeqj.de/sneak/smallwebwaf/pulls/382 (branch `issue-379-lookup-headers-by-default`).
The app could already get the AS number and country in `X-Client-ASN` and `X-Client-Country`, but only with `SWW_WAF_ADD_LOOKUP_HEADERS=true`. The PR makes `true` the default. The cost: with the default lookup source, GeoJS, a new client's first request waits for GeoJS's answer, up to 800 ms. Later requests from that client do not wait.
**What else is easy and available:**
- **Already looked up, nothing new to fetch:**
- the AS name, such as `Hetzner Online GmbH`, which both GeoJS and the IPinfo file give;
- the tags `waf` gave the request, such as `torexit`, `abuseipdb` or a DNS blocklist's tag;
- the client address `waf` settled on, which today the app must work out from `X-Forwarded-For` itself.
- **One more field read per answer:**
- both sources give the country name and the continent;
- only GeoJS gives city, region, time zone and latitude and longitude, so these would be missing with the IPinfo file.
**Question:** add any of these as headers to the app?
- **AS name only** (recommended): one more header, `X-Client-AS-Name`. Both sources have it, and it is already kept with each answer. The catch: some AS names hold non-ASCII letters, which a header cannot carry as they are.
- **AS name, tags and client address**: three headers, all from what `waf` already knows.
- **None**: AS number and country only, as the PR does.
Model: opus-5-5
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
at the very least, asn and country code. what else is easy and available?
PR: #382 (branch
issue-379-lookup-headers-by-default).The app could already get the AS number and country in
X-Client-ASNandX-Client-Country, but only withSWW_WAF_ADD_LOOKUP_HEADERS=true. The PR makestruethe default. The cost: with the default lookup source, GeoJS, a new client's first request waits for GeoJS's answer, up to 800 ms. Later requests from that client do not wait.What else is easy and available:
Hetzner Online GmbH, which both GeoJS and the IPinfo file give;wafgave the request, such astorexit,abuseipdbor a DNS blocklist's tag;wafsettled on, which today the app must work out fromX-Forwarded-Foritself.Question: add any of these as headers to the app?
X-Client-AS-Name. Both sources have it, and it is already kept with each answer. The catch: some AS names hold non-ASCII letters, which a header cannot carry as they are.wafalready knows.Model: opus-5-5