##
# HTTPS listener
# - Send to ALPN responder port 4444 if protocol is acme-tls/1
# - Default to HTTPS backend port 4443
##

frontend https
  mode tcp
  bind :443
  tcp-request inspect-delay 5s
  tcp-request content accept if { req_ssl_hello_type 1 }
  use_backend alpnresp if { req.ssl_alpn acme-tls/1 }
  default_backend https

# Default HTTPS backend
backend https
  mode tcp
  server https 127.0.0.1:4443

# ACME tls-alpn-01 responder backend
backend alpnresp
  mode tcp
  server acmesh 127.0.0.1:4444
