feat(HTTP Request Node): Option to provide SSL Certificates in Http Request Node (#9125)

Co-authored-by: कारतोफ्फेलस्क्रिप्ट™ <aditya@netroy.in>
This commit is contained in:
Michael Kret
2024-04-24 17:28:02 +03:00
committed by GitHub
parent 2cb62faf2f
commit 306b68da6b
9 changed files with 226 additions and 3 deletions

View File

@@ -497,7 +497,7 @@ export async function parseRequestObject(requestObject: IRequestOptions) {
}
const host = getHostFromRequestObject(requestObject);
const agentOptions: AgentOptions = {};
const agentOptions: AgentOptions = { ...requestObject.agentOptions };
if (host) {
agentOptions.servername = host;
}
@@ -505,6 +505,7 @@ export async function parseRequestObject(requestObject: IRequestOptions) {
agentOptions.rejectUnauthorized = false;
agentOptions.secureOptions = crypto.constants.SSL_OP_LEGACY_SERVER_CONNECT;
}
axiosConfig.httpsAgent = new Agent(agentOptions);
axiosConfig.beforeRedirect = getBeforeRedirectFn(agentOptions, axiosConfig);