#3957·bunkerweb

[BUG] LETS_ENCRYPT_PASSTHROUGH is hindered by REVERSE_PROXY_CUSTOM_HOST

Author: OdyXCreated Sep 22, 2026Updated Sep 23, 2026
Labelsbugconfigkubernetesnext minor

Affected area

Web UI

What happened?

As a followup to https://github.com/bunkerity/bunkerweb/issues/3927 ...

With a REVERSE_PROXY_CUSTOM_HOST set on a Kubernetes Ingress (using a cert-manager+bunkerweb clusterissuer), .well-known/acme-challenge/ requests do not get passed "as-is" (as would be expected from LETS_ENCRYPT_PASSTHROUGH) but they get the host from REVERSE_PROXY_CUSTOM_HOST set in the Host header, which results in such cert-manager errors:

I0922 07:57:24.658074       1 solver.go:99] "invalid host" logger="cert-manager.acmesolver" host="example.com" path="/.well-known/acme-challenge/...." base_path="/.well-known/acme-challenge" token="...." headers={"Accept-Encoding":["gzip"],"User-Agent":["cert-manager-challenges/v1.21.2 (linux/amd64) cert-manager/922a06aa49ee4bb802db268ef72a174af70edd32"],"X-Forwarded-For":["x.x.x.x"],"X-Forwarded-Host":["example.com"],"X-Forwarded-Prefix":["/.well-known/acme-challenge/...."],"X-Forwarded-Proto":["http"],"X-Forwarded-Protocol":["http"],"X-Real-Ip":["x.x.x.x"]} expected_host="example-com.waf.example.org"

With LETS_ENCRYPT_PASSTHROUGH, the Host header must not be set on the requests passed to the receiver of acme-challenges

How to reproduce?

Set both LETS_ENCRYPT_PASSTHROUGH and REVERSE_PROXY_CUSTOM_HOST

Configuration file(s) (yaml or .env)

yaml
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: waf-to-example-com
  annotations:
    # Use cert-manager, not bunkerweb for ACME certificates, via cert-manager
    cert-manager.io/cluster-issuer: bunkerweb-letsencrypt-staging
    bunkerweb.io/AUTO_LETS_ENCRYPT: "no"
    bunkerweb.io/LETS_ENCRYPT_PASSTHROUGH: "yes"
    
    # Where does this point?
    bunkerweb.io/REVERSE_PROXY_HOST: https://example.com:443/
    bunkerweb.io/REVERSE_PROXY_SSL_SNI: "yes"
    bunkerweb.io/REVERSE_PROXY_SSL_SNI_NAME: example.com
    bunkerweb.io/REVERSE_PROXY_CUSTOM_HOST: example.com
spec:
  ingressClassName: bunkerweb
  tls:
    - hosts:
      - example-com.waf.example.org
      secretName: website-waf
  rules:
  - host: example-com.waf.example.org
    http:
      paths:
      - path: /
        pathType: Prefix
        backend:
          service:
            name: dummy
            port:
              number: 404

Relevant log output

bash

BunkerWeb version

1.6.15

What integration are you using?

Kubernetes

Linux distribution (if applicable)

No response

Duplicate search

  • I searched open and closed issues and did not find an existing report

Removed private data

  • I have removed all private data from the configuration file and the logs

Code of Conduct

  • I agree to follow this project's Code of Conduct