HTTP_HOST issue in Diagnostic > System Check when running Matomo on Kubernetes

I’ve installed Matomo in a kubernetes namespace and I see these errors in Diagnostic > System Check

Unable to execute check for curl_exec: Failed to connect to port 443: Connection refused. Hostname requested was:

I think the root cause is the fact that this is the external URL. The check inside the pod should use http://matomo.myknamespace.srv.cluster.local:32260 instead.

Is there a way to force an URL rewrite in Matomo?