Skip to content

Commit

Permalink
Update health-check.js to allow unauthorized certs
Browse files Browse the repository at this point in the history
  • Loading branch information
galamdring authored Feb 17, 2025
1 parent bc09c04 commit 3a0a22b
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion packages/sync-server/src/scripts/health-check.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,

Check failure

Code scanning / CodeQL

Disabling certificate validation High

Disabling certificate validation is strongly discouraged.
strict: true,
localResolveHosts: true

Check failure on line 14 in packages/sync-server/src/scripts/health-check.js

View workflow job for this annotation

GitHub Actions / lint

Insert `,`
})
.then(res => res.json())
.then(res => {
if (res.status !== 'UP') {
Expand Down

0 comments on commit 3a0a22b

Please sign in to comment.