Page MenuHomeVyOS Platform

HAProxy: allow Host header (and HTTP version) in backend http-check
Open, WishlistPublicFEATURE REQUEST

Description

Backend <name> HTTP-check renders HTTP-check send method X URI Y only.

With no ver, HAProxy sends HTTP/1.0 without a Host header. Backends that route by Host (Kubernetes ingress, Traefik, nginx vhosts) return 404, and every server is marked DOWN. There is no CLI workaround, because the uri constraint blocks whitespace.

VyOS needs to add http-check host <fqdn> rendering ver HTTP/1.1 hdr Host <fqdn>, and optionally a http-check version 1.0|1.1 leaf.

Current template generated by VyOS:

backend whoami
    option httpchk
    http-check send meth GET uri /
    http-check expect status 200
    balance leastconn
    option forwardfor
    http-request set-header X-Forwarded-Port %[dst_port]
    http-request add-header X-Forwarded-Proto https if { ssl_fc }
    mode http
    server server01 192.168.1.3:443 check send-proxy-v2 ssl verify none
    server server02 192.168.1.4:443 check send-proxy-v2 ssl verify none
    server server03 192.168.1.5:443 check send-proxy-v2 ssl verify none
    timeout connect 30s
    timeout server 30s

Server Log:

26/Nov/2026:09:29:04 +0000 pp_src=- tcp_src=192.168.1.1 host_hdr="-" "GET / HTTP/1.0" 404
26/Nov/2026:09:29:06 +0000 pp_src=- tcp_src=192.168.1.1 host_hdr="-" "GET / HTTP/1.0" 404
26/Nov/2026:09:29:08 +0000 pp_src=- tcp_src=192.168.1.1 host_hdr="-" "GET / HTTP/1.0" 404

In comparison, backends with the stock HAProxy 3.2.27, http-check send meth GET uri / ver HTTP/1.1 hdr Host whoami.domain.local:

26/Nov/2026:09:50:43 +0000 pp_src=- tcp_src=192.168.1.1 host_hdr="whoami.domain.local" "GET / HTTP/1.1" 200
26/Nov/2026:09:50:44 +0000 pp_src=- tcp_src=192.168.1.1 host_hdr="whoami.domain.local" "GET / HTTP/1.1" 200

VyOS config:

set load-balancing haproxy backend whoami mode 'http'
set load-balancing haproxy backend whoami ssl no-verify
set load-balancing haproxy backend whoami http-check method 'get'
set load-balancing haproxy backend whoami http-check uri '/'
set load-balancing haproxy backend whoami http-check expect status '200'
set load-balancing haproxy backend whoami server server01 address '192.168.1.3'
set load-balancing haproxy backend whoami server server01 port '443'
set load-balancing haproxy backend whoami server server01 check
set load-balancing haproxy backend whoami server server01 send-proxy-v2
set load-balancing haproxy service whoami-http mode 'http'
set load-balancing haproxy service whoami-http port '8080'
set load-balancing haproxy service whoami-http rule 10 domain-name 'whoami.domain.local'
set load-balancing haproxy service whoami-http rule 10 set backend 'whoami'

Details

Version
1.5.1
Is it a breaking change?
Unspecified (possibly destroys the router)
Issue type
Feature (new functionality)

Event Timeline

Viacheslav triaged this task as Wishlist priority.Thu, Nov 26, 12:15 PM