mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
fix: fix workspace proxy command app link href (#11423)
* fix: workspace proxy command app link href
This commit is contained in:
@@ -59,7 +59,7 @@ describe("create app link", () => {
|
||||
},
|
||||
);
|
||||
expect(href).toBe(
|
||||
"/path-base/@username/Test-Workspace.a-workspace-agent/terminal?command=ls%20-la",
|
||||
"/@username/Test-Workspace.a-workspace-agent/terminal?command=ls%20-la",
|
||||
);
|
||||
});
|
||||
|
||||
|
||||
@@ -20,7 +20,10 @@ export const createAppLinkHref = (
|
||||
agent.name
|
||||
}/apps/${encodeURIComponent(appSlug)}/`;
|
||||
if (app.command) {
|
||||
href = `${preferredPathBase}/@${username}/${workspace.name}.${
|
||||
// Terminal links are relative. The terminal page knows how
|
||||
// to select the correct workspace proxy for the websocket
|
||||
// connection.
|
||||
href = `/@${username}/${workspace.name}.${
|
||||
agent.name
|
||||
}/terminal?command=${encodeURIComponent(app.command)}`;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user