Public Access
Visitor sign in kiosk: multi-site, badge printing, WWCC expiry warnings, admin accounts with 2FA
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
// Container healthcheck. Works whether the app is serving http or self-signed https.
|
||||
const secure = ['1', 'true', 'yes', 'on'].includes(String(process.env.HTTPS_ENABLED).toLowerCase());
|
||||
const port = process.env.PORT || 3000;
|
||||
const url = `${secure ? 'https' : 'http'}://127.0.0.1:${port}/healthz`;
|
||||
|
||||
if (secure) process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0';
|
||||
|
||||
try {
|
||||
const res = await fetch(url, { signal: AbortSignal.timeout(4000) });
|
||||
process.exit(res.ok ? 0 : 1);
|
||||
} catch {
|
||||
process.exit(1);
|
||||
}
|
||||
Reference in New Issue
Block a user