cmd/serve: don't convert localhost to 127.0.0.1
This is not valid in many situations, specifically when running a local astro site that listens on localhost, but ignores 127.0.0.1 Fixes: https://github.com/tailscale/tailscale/issues/12201 Signed-off-by: Josh McKinney <joshka@users.noreply.github.com>
This commit is contained in:
committed by
Brad Fitzpatrick
parent
210264f942
commit
1d6ab9f9db
+1
-1
@@ -538,7 +538,7 @@ func ExpandProxyTargetValue(target string, supportedSchemes []string, defaultSch
|
||||
return "", fmt.Errorf("invalid port %q", u.Port())
|
||||
}
|
||||
|
||||
u.Host = fmt.Sprintf("%s:%d", host, port)
|
||||
u.Host = fmt.Sprintf("%s:%d", u.Hostname(), port)
|
||||
|
||||
return u.String(), nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user