Skip to content

Commit d1cf550

Browse files
committed
fix: only specify vscode proxy uri if app subdomains enabled
Otherwise this generates an invalid URI that breaks code-server!
1 parent 6873877 commit d1cf550

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

coderd/workspaceagents.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,9 @@ func (api *API) workspaceAgentManifest(rw http.ResponseWriter, r *http.Request)
216216
Username: owner.Username,
217217
}
218218
vscodeProxyURI := api.AccessURL.Scheme + "://" + strings.ReplaceAll(api.AppHostname, "*", appHost.String())
219-
219+
if api.AppHostname == "" {
220+
vscodeProxyURI += api.AccessURL.Hostname()
221+
}
220222
if api.AccessURL.Port() != "" {
221223
vscodeProxyURI += fmt.Sprintf(":%s", api.AccessURL.Port())
222224
}

0 commit comments

Comments
 (0)