Skip to content

Commit 6b2133c

Browse files
committed
chore: fix false positives in CodeQL for TS
1 parent e1f27a7 commit 6b2133c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

site/src/utils/apps.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export const createAppLinkHref = (
2929
}
3030

3131
if (appsHost && app.subdomain && app.subdomain_name) {
32-
const baseUrl = `${protocol}//${appsHost.replace("*", app.subdomain_name)}`;
32+
const baseUrl = `${protocol}//${appsHost.replace(/\*/g, app.subdomain_name)}`;
3333
const url = new URL(baseUrl);
3434
url.pathname = "/";
3535

site/src/utils/portForward.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export const portForwardURL = (
1515

1616
const subdomain = `${port}${suffix}--${agentName}--${workspaceName}--${username}`;
1717

18-
const baseUrl = `${location.protocol}//${host.replace("*", subdomain)}`;
18+
const baseUrl = `${location.protocol}//${host.replace(/\*/g, subdomain)}`;
1919
const url = new URL(baseUrl);
2020
if (pathname) {
2121
url.pathname = pathname;

0 commit comments

Comments
 (0)