We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
This is related to coder/coder#8889
We run the coder api behind a TLS proxy and would like to be able to specify the client cert/key on the vscode plugin requests.
It appears we just need to add cert and key options to the axios default client: https://github.com/coder/vscode-coder/blob/main/src/extension.ts#L39-L43
cert
key
axios
I hacked on the plugin a bit it seems these were the only changes necessary:
const applyInsecure = () => { const cfg = vscode.workspace.getConfiguration() const insecure = Boolean(cfg.get("coder.insecure")) const certFile = String(cfg.get("coder.certFile")) const keyFile = String(cfg.get("coder.keyFile")) const caFile = String(cfg.get("coder.caFile")) axios.defaults.httpsAgent = new https.Agent({ cert: certFile === "" ? undefined : fs.readFileSync(certFile), key: keyFile === "" ? undefined : fs.readFileSync(keyFile), ca: caFile === "" ? undefined : fs.readFileSync(caFile), // rejectUnauthorized defaults to true, so we need to explicitly set it to false // if we want to allow self-signed certificates. rejectUnauthorized: !insecure, }) }
I know little typescript, so there is likely a better way to do it, and we would likely want to change the applyInsecure name for the expanded scope.
applyInsecure
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
This is related to coder/coder#8889
We run the coder api behind a TLS proxy and would like to be able to specify the client cert/key on the vscode plugin requests.
It appears we just need to add
cert
andkey
options to theaxios
default client:https://github.com/coder/vscode-coder/blob/main/src/extension.ts#L39-L43
I hacked on the plugin a bit it seems these were the only changes necessary:
I know little typescript, so there is likely a better way to do it, and we would likely want to change the
applyInsecure
name for the expanded scope.The text was updated successfully, but these errors were encountered: