http_proxy support broken with placeholders
Author: lamdorCreated Aug 29, 2025Updated Aug 24, 2026
Labelsbug :lady_beetle:
Issue Details
When using a http proxy like squid, with the change introduced in https://github.com/caddyserver/caddy/pull/6955 in 2.10.1, TLS handshakes with the http proxy fail like:
{"level":"error","ts":1756479775.99738,"logger":"http.log.access","msg":"handled request","request":{"remote_ip":"10.32.0.1","remote_port":"5970","client_ip":"10.32.0.1","proto":"HTTP/1.1","method":"HEAD","host":"REDACTED","uri":"REDACTED","headers":{"Authorization":["REDACTED"],"Julia-Version":["1.11.5"],"Accept":["*/*"],"User-Agent":["HTTP.jl/1.11.5"],"Content-Length":["0"],"Accept-Encoding":["gzip"]}},"bytes_read":0,"user_id":"","duration":0.017466018,"size":0,"status":503,"resp_headers":{"Mime-Version":["1.0"],"Content-Length":["4064"],"Content-Language":["en"],"X-Cache-Lookup":["NONE from ip-172-31-1-132.ec2.internal:3128"],"Date":["Fri, 29 Aug 2025 15:02:55 GMT"],"Via":["1.1 Caddy","1.1 ip-172-31-1-132.ec2.internal (squid/4.15)"],"Content-Type":["text/html;charset=utf-8"],"X-Squid-Error":["ERR_SECURE_CONNECT_FAIL 71"],"X-Cache":["MISS from ip-172-31-1-132.ec2.internal"],"Vary":["Accept-Language"]}}
Notice the ERR_SECURE_CONNECT_FAIL. When changing the Caddyfile to not use placeholders, it works fine.
Assistance Disclosure
AI used
If AI was used, describe the extent to which it was used.
Claude helped find the change between 2.10.0 and 2.10.2 that broke it.
Source: caddyserver/caddy