Skip to content

Commit 807975f

Browse files
authored
Do not reject unauthorized hosts if proxyStrictSSL is false (#1559)
## Changes New JS SDK version uses `rejectUnauthorized` option based on the new env variable TODO: update js sdk after it's released ## Tests <!-- How is this tested? -->
1 parent 811d9ed commit 807975f

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

packages/databricks-vscode/src/extension.ts

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,9 +232,21 @@ export async function activate(
232232
customWhenContext.updateShowWorkspaceView();
233233
}
234234

235+
function updateStrictSSLEnv() {
236+
const httpConfig = workspace.getConfiguration("http");
237+
const proxyStrictSSL = httpConfig.get<boolean>("proxyStrictSSL");
238+
process.env["DATABRICKS_SDK_PROXY_STRICT_SSL"] = proxyStrictSSL
239+
? "true"
240+
: "false";
241+
}
242+
235243
updateFeatureContexts();
244+
updateStrictSSLEnv();
236245
context.subscriptions.push(
237-
workspace.onDidChangeConfiguration(updateFeatureContexts)
246+
workspace.onDidChangeConfiguration(() => {
247+
updateFeatureContexts();
248+
updateStrictSSLEnv();
249+
})
238250
);
239251

240252
// Configuration group

0 commit comments

Comments
 (0)