diff --git a/coderd/workspaceagents.go b/coderd/workspaceagents.go index c506c83e20666..52fa7cf8d4ab3 100644 --- a/coderd/workspaceagents.go +++ b/coderd/workspaceagents.go @@ -216,7 +216,9 @@ func (api *API) workspaceAgentManifest(rw http.ResponseWriter, r *http.Request) Username: owner.Username, } vscodeProxyURI := api.AccessURL.Scheme + "://" + strings.ReplaceAll(api.AppHostname, "*", appHost.String()) - + if api.AppHostname == "" { + vscodeProxyURI += api.AccessURL.Hostname() + } if api.AccessURL.Port() != "" { vscodeProxyURI += fmt.Sprintf(":%s", api.AccessURL.Port()) }