private Authenticator.Result checkAllowlistHostHeader(final HttpExchange exch) {
    if (config.getHostsAllowlist().contains("*")) {
      return AUTHORIZED;
    }

    return Optional.ofNullable(exch.getRequestHeaders().getFirst("Host"))
        .map(host -> HostAndPort.parseAuthority(host, -1).host())
        .filter(this::hostIsInAllowlist)
        .map(unused -> AUTHORIZED)
        .orElse(NOT_AUTHORIZED);
  }
Instantiates a new Metrics http service.

@param configuration the configuration
@param metricsSystem the metrics system
metrics/core/src/main/java/org/hyperledger/besu/metrics/prometheus/MetricsHttpService.java