Open
Description
Issue Description
Requests that reach the final server contain the Host
header from the original request. If the destination server checks the header Host
(eg: ingress in k8s cluster with Host
rules) and if the values do not match, then the request is rejected or etc...
Checklist
- Dependencies installed
- No typos
- Searched existing issues and docs
Expected behaviour
proxy replace request.Host to target.URL.Host
Actual behaviour
request.Host stay immutable
Steps to reproduce
- http server which checks
Host
header (srv1) - http server with echo using middleware proxy (proxy) - target url to srv1, domain for proxy <> domain for srv1
- run both srv1 and proxy
- request to proxy
client (localhost) --(Host: proxy.domain.com)--> proxy (proxy.domain.com) --(Host: proxy.domain.com)--> srv1 (srv1.domain.com)
Version/commit
echo v4.12.0
dirty workaround
- use vendoring
- add to github.com/labstack/echo/v4/middleware/proxy.go
req.Host = tgt.URL.Host
P.S. Maybe add option to ProxyConfig
Metadata
Metadata
Assignees
Labels
No labels