Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
prepare(actor: Actor): Actor {
return actor.whoCan(
ManageALocalServer.runningAHttpListener(function (request, response) {
response.setHeader('Connection', 'close');
response.end('Hello World!');
}),
CallAnApi.using(axios.create()),
);
}
}
prepare(actor: Actor): Actor {
return actor.whoCan(
ManageALocalServer.runningAHttpsListener(restify.handler({
certificate: certificates.cert,
key: certificates.key,
})),
CallAnApi.using(axios.create({
proxy: false,
httpsAgent: new https.Agent({
cert: certificates.cert,
key: certificates.key,
rejectUnauthorized: false,
}),
})),
);
}
}