mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
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:
@@ -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())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user