diff --git a/src/proxy.go b/src/proxy.go index 919663c..fe286c1 100644 --- a/src/proxy.go +++ b/src/proxy.go @@ -68,11 +68,9 @@ // rewrite the port for redirect responses switch rsp.StatusCode { case 301, 302, 303, 307, 308: - { - url, _ := url.Parse(rsp.Header["Location"][0]) - newUrl := RewritePort(url, strconv.Itoa(proxyOpts.Port)) - rsp.Header["Location"][0] = newUrl.String() - } + url, _ := url.Parse(rsp.Header["Location"][0]) + newUrl := RewritePort(url, strconv.Itoa(proxyOpts.Port)) + rsp.Header["Location"][0] = newUrl.String() } showResponse(rsp)