Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
do-resolve woes
log stdout local0
mode http
resolvers main_resolver
nameserver dns1
frontend fe_forwarder
log global
option httplog
http-request set-header Host %[req.fhdr(X-Host)]
http-request do-resolve(txn.myip,main_resolver,ipv4) hdr(Host),lower
http-request capture var(txn.myip) len 40
default_backend be_forwarder
backend be_named
server-template serv 1-2 resolvers main_resolver resolve-prefer ipv4
backend be_forwarder
http-request deny if { var(txn.myip) -m ip }
http-request del-header X-Host
http-request set-dst var(txn.myip)
server clear
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.