feat: Let port-forwarding support custom http(s) port (#5084)

This commit is contained in:
Tao Yang
2022-12-02 04:39:19 +08:00
committed by GitHub
parent 2ec3b09ca7
commit 5457dd0c65
3 changed files with 17 additions and 4 deletions

View File

@ -124,6 +124,9 @@ func (api *API) workspaceAgentMetadata(rw http.ResponseWriter, r *http.Request)
workspace.Name,
owner.Username,
))
if api.AccessURL.Port() != "" {
vscodeProxyURI += fmt.Sprintf(":%s", api.AccessURL.Port())
}
httpapi.Write(ctx, rw, http.StatusOK, codersdk.WorkspaceAgentMetadata{
Apps: convertApps(dbApps),