mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
chore: fix false positives in CodeQL for TS (#17139)
Fixes some false positives flagged by CodeQL
This commit is contained in:
@@ -29,7 +29,7 @@ export const createAppLinkHref = (
|
||||
}
|
||||
|
||||
if (appsHost && app.subdomain && app.subdomain_name) {
|
||||
const baseUrl = `${protocol}//${appsHost.replace("*", app.subdomain_name)}`;
|
||||
const baseUrl = `${protocol}//${appsHost.replace(/\*/g, app.subdomain_name)}`;
|
||||
const url = new URL(baseUrl);
|
||||
url.pathname = "/";
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ export const portForwardURL = (
|
||||
|
||||
const subdomain = `${port}${suffix}--${agentName}--${workspaceName}--${username}`;
|
||||
|
||||
const baseUrl = `${location.protocol}//${host.replace("*", subdomain)}`;
|
||||
const baseUrl = `${location.protocol}//${host.replace(/\*/g, subdomain)}`;
|
||||
const url = new URL(baseUrl);
|
||||
if (pathname) {
|
||||
url.pathname = pathname;
|
||||
|
||||
Reference in New Issue
Block a user