We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0b30585 commit 32508efCopy full SHA for 32508ef
src/settings/proxySettings.ts
@@ -75,7 +75,7 @@ export function getProxySettings(): ProxySettings {
75
return null;
76
}
77
const regexResult = HOST_AND_PORT_EXTRACTOR.exec(proxyAddress);
78
- if (!regexResult[1]) {
+ if (!regexResult || !regexResult[1]) {
79
80
81
const host: string = regexResult[1];
@@ -152,7 +152,7 @@ export function jvmArgsContainsProxySettings(jvmArgs: string): boolean {
152
);
153
154
155
-const HOST_AND_PORT_EXTRACTOR = /https?:\/\/([^:/]+)(?::([0-9]+))?/;
+const HOST_AND_PORT_EXTRACTOR = /(?:https?:\/\/)?([^:/]+)(?::([0-9]+))?/;
156
157
const JVM_PROXY_HOST = 'http.proxyHost';
158
const JVM_PROXY_PORT = 'http.proxyPort';
0 commit comments