Fix ASN DB URL to the remote-proxy scheme
ci/woodpecker/pr/build Pipeline was successful
ci/woodpecker/pr/pre-commit Pipeline was successful
ci/woodpecker/pr/test Pipeline was successful

Remote proxies are served at /api/v1/remote/<name>/<path>, not the v2
/remotes/<name>/files/ path (which is the local-repo PUT scheme). Correct the
default iplocate DB URL accordingly. Verified the scheme against an existing
github-remote asset (returns 200).
This commit is contained in:
benvin
2026-07-22 00:59:37 +10:00
parent 86876687a7
commit ef9a71bf0a
+3 -2
View File
@@ -15,9 +15,10 @@ import (
)
// DefaultIPLocateDBURL is the iplocate ip-to-asn CSV database, proxied through
// the artifactapi github remote. The files are Git-LFS, so the /raw/ path
// the artifactapi github remote. Remote proxies are served at
// /api/v1/remote/<name>/<path>. The files are Git-LFS, so the /raw/ path
// redirects to the LFS media host — artifactapi follows that redirect.
const DefaultIPLocateDBURL = "https://artifactapi.k8s.syd1.au.unkin.net/api/v2/remotes/github/files/iplocate/ip-address-databases/raw/main/ip-to-asn/ip-to-asn.csv.zip"
const DefaultIPLocateDBURL = "https://artifactapi.k8s.syd1.au.unkin.net/api/v1/remote/github/iplocate/ip-address-databases/raw/main/ip-to-asn/ip-to-asn.csv.zip"
// IPLocateDB expands ASNs by reading iplocate's ip-to-asn CSV (CIDR,asn,...). It
// downloads and indexes the whole database once, then serves every ASN group