Merge pull request #2202 from bluewave-labs/feat/ignore-ssl-errors

feat: ignore ssl errors
This commit is contained in:
Alexander Holliday authored and GitHub committed 2025-05-06 10:14:35 -07:00
commit ceb75a7311
3 files changed
+15

No files matched your search

+9
View File
@@ -1,4 +1,6 @@
import jmespath from "jmespath";
import https from "https";
const SERVICE_NAME = "NetworkService";
const UPROCK_ENDPOINT = "https://api.uprock.com/checkmate/push";
@@ -133,6 +135,7 @@ class NetworkService {
name,
teamId,
type,
ignoreTlsErrors,
jsonPath,
matchMethod,
expectedValue,
@@ -141,6 +144,12 @@ class NetworkService {
secret !== undefined && (config.headers = { Authorization: `Bearer ${secret}` });
if (ignoreTlsErrors === true) {
config.httpsAgent = new https.Agent({
rejectUnauthorized: false,
});
}
const { response, responseTime, error } = await this.timeRequest(() =>
this.axios.get(url, config)
);