From bf8af312ebd6b9de33c219eac690d93a52dc4e7d Mon Sep 17 00:00:00 2001 From: f Date: Fri, 12 Jun 2026 17:48:13 -0300 Subject: [PATCH] fix: remove port, add sni when setting the port, alloy sends host:port as Host header and confuses nginx --- config.alloy.tmpl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/config.alloy.tmpl b/config.alloy.tmpl index b65dff0..cd80302 100644 --- a/config.alloy.tmpl +++ b/config.alloy.tmpl @@ -35,11 +35,12 @@ prometheus.scrape "forgejo" { job_name = "forgejo" scheme = "https" - targets = [{ __address__ = "{{ env "FORGEJO_METRICS_HOSTNAME" }}:443" }] + targets = [{ __address__ = "{{ env "FORGEJO_METRICS_HOSTNAME" }}" }] forward_to = [prometheus.remote_write.prometheus.receiver] tls_config { insecure_skip_verify = {{ env "FORGEJO_INSECURE_SKIP_VERIFY" }} + server_name = "{{ env "FORGEJO_METRICS_HOSTNAME" }}" } } {{ end }}