NewSingleHostReverseProxy sets only X-Forwarded-For, so a backend that writes its own addresses saw the plain hop from the proxy: Gitea's Go import tag named an http clone URL and go get refused the SDK's module path. The proxy now sets X-Forwarded-Proto, -Host and -For from the request it received, and keeps the Host header as it was.