Skip to content

Commit

Permalink
✨ Add support for insecure HTTPS (fixed upptime/upptime#57)
Browse files Browse the repository at this point in the history
  • Loading branch information
AnandChowdhary committed Nov 17, 2020
1 parent 6010cdf commit 49ea215
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/interfaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ export interface UpptimeConfig {
url: string;
assignees?: string[];
headers?: string[];
__dangerous__insecure?: boolean;
}[];
notifications?: { type: string; [index: string]: string }[];
assignees: string[];
Expand Down
1 change: 1 addition & 0 deletions src/update.ts
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,7 @@ const curl = (site: UpptimeConfig["sites"][0]): Promise<{ httpCode: number; tota
curl.setOpt("URL", url);
if (site.headers)
curl.setOpt(Curl.option.HTTPHEADER, site.headers.map(replaceEnvironmentVariables));
if (site.__dangerous__insecure) curl.setOpt("SSL_VERIFYPEER", false);
curl.setOpt("FOLLOWLOCATION", 1);
curl.setOpt("MAXREDIRS", 3);
curl.setOpt("USERAGENT", "Koj Bot");
Expand Down

0 comments on commit 49ea215

Please sign in to comment.