aboutsummaryrefslogtreecommitdiff
path: root/pkg/api/api0
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/api/api0')
-rw-r--r--pkg/api/api0/api.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/pkg/api/api0/api.go b/pkg/api/api0/api.go
index afce1d4..79766e5 100644
--- a/pkg/api/api0/api.go
+++ b/pkg/api/api0/api.go
@@ -228,6 +228,10 @@ func (h *Handler) ExtractLauncherVersion(r *http.Request) string {
// geoCounter2 increments a [metricsx.GeoCounter2] for the location of r.
func (h *Handler) geoCounter2(r *http.Request, ctr *metricsx.GeoCounter2) {
+ if h.LookupIP == nil {
+ return
+ }
+
a, err := netip.ParseAddrPort(r.RemoteAddr)
if err != nil {
return