From 3a0a22b9f0b96cbf387bedf11d5dec8bcaaa0b94 Mon Sep 17 00:00:00 2001 From: Luke Mckechnie Date: Mon, 17 Feb 2025 09:39:19 -0600 Subject: [PATCH] Update health-check.js to allow unauthorized certs --- packages/sync-server/src/scripts/health-check.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/packages/sync-server/src/scripts/health-check.js b/packages/sync-server/src/scripts/health-check.js index dfbec31525d..d22e4b709ea 100644 --- a/packages/sync-server/src/scripts/health-check.js +++ b/packages/sync-server/src/scripts/health-check.js @@ -5,7 +5,14 @@ import { config } from '../load-config.js'; const protocol = config.https ? 'https' : 'http'; const hostname = config.hostname === '::' ? 'localhost' : config.hostname; -fetch(`${protocol}://${hostname}:${config.port}/health`) +fetch(`${protocol}://${hostname}:${config.port}/health`, { + headers: { + 'X-Forwarded-Proto': protocol, + }, + rejectUnauthorized: false, + strict: true, + localResolveHosts: true +}) .then(res => res.json()) .then(res => { if (res.status !== 'UP') {