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') { diff --git a/upcoming-release-notes/4395.md b/upcoming-release-notes/4395.md new file mode 100644 index 00000000000..15243099151 --- /dev/null +++ b/upcoming-release-notes/4395.md @@ -0,0 +1,6 @@ +--- +category: Features +authors: [galamdring] +--- + +Update health-check.js script to allow for unauthorized certs.