Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commita02ba66

Browse files
fix: fill session token when app is external (#17708)
Fix#17704During the [refactoring of WorkspaceApp responsetype](https://github.com/coder/coder/pull/17700/files#diff-a7e67944708c3c914a24a02d515a89ecd414bfe61890468dac08abde55ba8e96R112),I updated the logic to check if the session token should be injectedcausing external apps to not load correctly.To also avoid future confusions, we are only going to rely on the`app.external` prop to open apps externally instead of verifying if theURL does not use the HTTP protocol. I did some research and I didn'tfind out a use case where it would be a problem.I'm going to refactor this code very soon to allow opening apps from theworkspaces page, so I will write the tests to cover this use case there.**Not included:**During my next refactoring I'm also going to change the code to supporttoken injections directly in the HREF instead of making it happen duringthe click event.
1 parent29bce8d commita02ba66

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

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

Lines changed: 1 addition & 6 deletions
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-
constshouldOpenAppExternally=
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

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp