mirror of
https://github.com/go-gost/x.git
synced 2026-10-20 08:18:33 +00:00
A valid Gost-Target / X-Gost-Target header replaced only req.Host while leaving req.URL.Host untouched. Destination-policy checks (bypass) evaluated the header-derived authority, but http.Transport dialed the unchanged absolute-URL authority. A client could label a forbidden URL with an allowed authority and reach the blocked destination (403 -> 200 with backend body). setRequestHost now applies the decoded target to both req.Host and req.URL.Host so policy evaluation and transport dialing always resolve to the same authority.