Archived
1
0

Set proxy URI to domain proxy when possible (#6115)

This will make the ports panel use it instead of the default path-based
proxy.
This commit is contained in:
Asher
2023-03-30 12:01:49 -08:00
committed by GitHub
parent a44bd71043
commit c995988b70
2 changed files with 29 additions and 0 deletions

View File

@ -571,6 +571,9 @@ export async function setDefaults(cliArgs: UserProvidedArgs, configArgs?: Config
// Filter duplicate proxy domains and remove any leading `*.`.
const proxyDomains = new Set((args["proxy-domain"] || []).map((d) => d.replace(/^\*\./, "")))
args["proxy-domain"] = Array.from(proxyDomains)
if (args["proxy-domain"].length > 0 && !process.env.VSCODE_PROXY_URI) {
process.env.VSCODE_PROXY_URI = `{{port}}.${args["proxy-domain"][0]}`
}
if (typeof args._ === "undefined") {
args._ = []