Add best-effort geolocation to the IP lookup from geojs and DB-IP City Lite (closes #239)
check / check (push) Successful in 4m19s
check / check (push) Successful in 4m19s
Each result gains `geo`. One request to geojs carries every address, 1 second in all. On a timeout, an error or an answer with no country, city or coordinates, the lookup reads DB-IP City Lite, downloaded monthly into the state directory. geojs answers stay in memory (250,000, least recently used dropped) and in a new `cache.db` table for 7 days. Judgement call: a reserved address goes to neither source, and its `geo` is null. Judgement call: `updated` for DB-IP is when the copy was downloaded. Deviation: the cache is SQLite, by sneak's words. Model: opus-5-5
This commit is contained in:
1 parent
2c3f6f71dc
commit
fe392db4fc
16 files changed
+2372
-22
No files matched your search
@@ -544,6 +544,8 @@
|
||||
<span>{{appLicense}}</span>
|
||||
<span class="separator">|</span>
|
||||
<span><a href="{{appGitCommitURL}}">{{appGitRevision}}</a></span>
|
||||
<span class="separator">|</span>
|
||||
<span>IP Geolocation by <a href="https://db-ip.com">DB-IP</a></span>
|
||||
</footer>
|
||||
|
||||
<script nonce="{{.CSPNonce}}">
|
||||
|
||||
Reference in new issue
Block a user