get agent options verbose fetch logging
This commit is contained in:
parent
05020b62a9
commit
45b7069eb8
1 changed files with 13 additions and 0 deletions
|
|
@ -61,6 +61,19 @@ export function getAgentOptions(requestOptions?: RequestOptions): {
|
|||
keepAliveMsecs: timeout,
|
||||
};
|
||||
|
||||
if (process.env.VERBOSE_FETCH) {
|
||||
console.log("=== CERTIFICATE CONFIGURATION ===");
|
||||
console.log(`Number of CA certificates: ${ca.length}`);
|
||||
console.log(
|
||||
`Global agent CA certificates: ${globalAgent.options.ca ? "Present" : "Not present"}`,
|
||||
);
|
||||
console.log(
|
||||
`Custom certificates provided: ${customCerts?.length ? "Yes" : "No"}`,
|
||||
);
|
||||
console.log(`rejectUnauthorized: ${agentOptions.rejectUnauthorized}`);
|
||||
console.log("================================");
|
||||
}
|
||||
|
||||
// Handle ClientCertificateOptions
|
||||
if (requestOptions?.clientCertificate) {
|
||||
const { cert, key, passphrase } = requestOptions.clientCertificate;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue