Skip to content

Commit

Permalink
🐛 Fix upptime/upptime#127 by adding max redirects
Browse files Browse the repository at this point in the history
  • Loading branch information
AnandChowdhary committed Dec 20, 2020
1 parent 4d4708e commit 72bfce1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/helpers/request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export const curl = (
if (site.__dangerous__insecure || site.__dangerous__disable_verify_host)
curl.setOpt("SSL_VERIFYHOST", false);
curl.setOpt("FOLLOWLOCATION", 1);
curl.setOpt("MAXREDIRS", 3);
curl.setOpt("MAXREDIRS", site.maxRedirects || 3);
curl.setOpt("USERAGENT", "Koj Bot");
curl.setOpt("CONNECTTIMEOUT", 10);
curl.setOpt("TIMEOUT", 30);
Expand Down
1 change: 1 addition & 0 deletions src/interfaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export interface UpptimeConfig {
body?: string;
icon?: string;
maxResponseTime?: number;
maxRedirects?: number;
__dangerous__insecure?: boolean;
__dangerous__disable_verify_peer?: boolean;
__dangerous__disable_verify_host?: boolean;
Expand Down

0 comments on commit 72bfce1

Please sign in to comment.