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:
@ -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._ = []
|
||||
|
Reference in New Issue
Block a user