mirror of https://github.com/coder/coder.git
fix: only specify vscode proxy uri if app subdomains enabled (#9891)
Otherwise this generates an invalid URI that breaks code-server!
This commit is contained in:
parent
cb5f8df4c2
commit
de6d0b9a1a
|
@ -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())
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue