Skip to content

Commit 73ffe73

Browse files
committed
fix: fill session token when app is external
1 parent 6ac1bd8 commit 73ffe73

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

site/src/modules/resources/AppLink/AppLink.tsx

+2-6
Original file line numberDiff line numberDiff line change
@@ -106,12 +106,7 @@ export const AppLink: FC<AppLinkProps> = ({ app, workspace, agent }) => {
106106

107107
event.preventDefault();
108108

109-
// This is an external URI like "vscode://", so
110-
// it needs to be opened with the browser protocol handler.
111-
const shouldOpenAppExternally =
112-
app.external && app.url?.startsWith("http");
113-
114-
if (shouldOpenAppExternally) {
109+
if (app.external) {
115110
// This is a magic undocumented string that is replaced
116111
// with a brand-new session token from the backend.
117112
// This only exists for external URLs, and should only
@@ -137,6 +132,7 @@ export const AppLink: FC<AppLinkProps> = ({ app, workspace, agent }) => {
137132
clearTimeout(openAppExternallyFailed);
138133
});
139134

135+
console.log("URL", url);
140136
window.location.href = url;
141137
return;
142138
}

0 commit comments

Comments
 (0)