Commit 479d0773 authored by nanahira's avatar nanahira

ignore cert error

parent 7564f0a5
Pipeline #16318 passed with stages
in 32 seconds
......@@ -8,6 +8,7 @@ import { assert } from 'console';
import { ping } from 'icmp';
import delay from 'delay';
import PQueue from 'p-queue';
import https from 'https';
interface Source {
protocol: string;
......@@ -79,6 +80,11 @@ enum ConnectResult {
}
class Checker {
private http = axios.create({
httpsAgent: new https.Agent({
rejectUnauthorized: false,
}),
});
private client: Aliyun;
private cdnRecordsRegex: RegExp[];
static order = 0;
......@@ -193,7 +199,7 @@ class Checker {
private async connectHttpProcess(url: string, hostHeader: string) {
try {
await axios.get(url, {
await this.http.get(url, {
headers: { Host: hostHeader },
timeout: this.config.timeout,
validateStatus: (status) => status < 500,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment