From bbced15076acf12d8cabc3c263303c97f6a3c4dc Mon Sep 17 00:00:00 2001 From: Simon Larsen Date: Wed, 16 Oct 2024 12:50:24 +0100 Subject: [PATCH] do not follow redirects when monitoring --- Probe/Utils/Monitors/MonitorTypes/ApiMonitor.ts | 1 + Probe/Utils/Monitors/MonitorTypes/WebsiteMonitor.ts | 1 + 2 files changed, 2 insertions(+) diff --git a/Probe/Utils/Monitors/MonitorTypes/ApiMonitor.ts b/Probe/Utils/Monitors/MonitorTypes/ApiMonitor.ts index 247e11f8f42..f8149b8710d 100644 --- a/Probe/Utils/Monitors/MonitorTypes/ApiMonitor.ts +++ b/Probe/Utils/Monitors/MonitorTypes/ApiMonitor.ts @@ -66,6 +66,7 @@ export default class ApiMonitor { undefined, { timeout: options.timeout?.toNumber() || 5000, + doNotFollowRedirects: true, }, ); diff --git a/Probe/Utils/Monitors/MonitorTypes/WebsiteMonitor.ts b/Probe/Utils/Monitors/MonitorTypes/WebsiteMonitor.ts index b227f645de5..b3187320cc2 100644 --- a/Probe/Utils/Monitors/MonitorTypes/WebsiteMonitor.ts +++ b/Probe/Utils/Monitors/MonitorTypes/WebsiteMonitor.ts @@ -73,6 +73,7 @@ export default class WebsiteMonitor { result = await WebsiteRequest.fetch(url, { isHeadRequest: false, timeout: options.timeout?.toNumber() || 5000, + doNotFollowRedirects: true, }); }