You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When per_host is enabled in Caddy's metrics configuration, the Host header (from r.Host) is used directly as a label in Prometheus metrics without any validation or length restriction. This allows users to generate high cardinality metrics by sending requests with extremely long Host headers (I faced 25k+ strings), causing excessive memory consumption in Prometheus instances.
{
metrics {
per_host
}
}
// For regulatory reasons, I need to avoid returning 308 redirects to non-whitelisted domains
:80 {
respond "MUST Match Host" 403 {
close
}
}
https://example.com {
...
}