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

Commita735aac

Browse files
committed
feat: link with protocol on shared ports
1 parent1d4bf30 commita735aac

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -393,6 +393,7 @@ export const PortForwardPopoverView: FC<PortForwardPopoverViewProps> = ({
393393
agent.name,
394394
workspaceName,
395395
username,
396+
share.protocol==="https",
396397
);
397398
constlabel=share.port;
398399
return(

‎site/src/utils/portForward.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,13 @@ export const portForwardURL = (
44
agentName:string,
55
workspaceName:string,
66
username:string,
7+
https=false,
78
):string=>{
89
const{ location}=window;
10+
constsuffix=https ?"s" :"";
911

10-
constsubdomain=`${
11-
isNaN(port) ?3000 :port
12-
}--${agentName}--${workspaceName}--${username}`;
12+
constsubdomain=`${port
13+
}${suffix}--${agentName}--${workspaceName}--${username}`;
1314
return`${location.protocol}//${host}`.replace("*",subdomain);
1415
};
1516

@@ -53,6 +54,7 @@ export const openMaybePortForwardedURL = (
5354
portForwardURL(
5455
proxyHost,
5556
parseInt(url.port),
57+
5658
agentName,
5759
workspaceName,
5860
username,

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp