add boot page conditionally; rationalize reach-ability check

pull/850/head
Paul Fitzpatrick 3 months ago
parent d066a9c43a
commit 3fd56bcece
No known key found for this signature in database
GPG Key ID: 07F16BF3214888F6

@ -75,14 +75,7 @@ const _homeUrlReachableProbe: Probe = {
try {
const resp = await fetch(url);
if (resp.status !== 200) {
return {
success: false,
severity: 'fault',
details: {
error: await resp.text(),
status: resp.status,
}
};
throw new ApiError(await resp.text(), resp.status);
}
return {
success: true,

@ -104,7 +104,9 @@ export async function main(port: number, serverTypes: ServerType[],
}
server.addHealthCheck();
server.addBootPage();
if (includeHome || includeApp) {
server.addBootPage();
}
server.denyRequestsIfNotReady();
if (includeHome || includeStatic || includeApp) {

Loading…
Cancel
Save