Skip to content

Commit 289d4bd

Browse files
jaggederestCopilot
andauthored
Update src/api.ts
Co-authored-by: Copilot <[email protected]>
1 parent b7ed796 commit 289d4bd

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

src/api.ts

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,9 +113,14 @@ export async function createHttpAgent(): Promise<ProxyAgent> {
113113
config("coder.proxyBypass"),
114114
);
115115
},
116-
cert: await readFile(certFile),
117-
key: await readFile(keyFile),
118-
ca: await readFile(caFile),
116+
...(() => {
117+
const [cert, key, ca] = await Promise.all([
118+
readFile(certFile),
119+
readFile(keyFile),
120+
readFile(caFile),
121+
]);
122+
return { cert, key, ca };
123+
})(),
119124
servername: checkEmptyString(altHost),
120125
// rejectUnauthorized defaults to true, so we need to explicitly set it to
121126
// false if we want to allow self-signed certificates.

0 commit comments

Comments
 (0)