probe production document browser capability
This commit is contained in:
@@ -42,13 +42,17 @@ checks.health = await probe('/api/health', 'ok');
|
||||
// /api/health and /api/ready use the same { ok: true } probe contract. The
|
||||
// readiness payload also includes a separate `ready` diagnostic field.
|
||||
checks.ready = await probe('/api/ready', 'ok');
|
||||
const missingHeaders = requiredHeaders.filter(name => [checks.home, checks.health, checks.ready].some(check => check?.headers?.[name] == null));
|
||||
// The EKAP document fallback depends on the bundled browser being available;
|
||||
// check its public capability endpoint without opening a document or mutating
|
||||
// any account data.
|
||||
checks.documents = await probe('/api/documents/config', 'tarayiciVar');
|
||||
const missingHeaders = requiredHeaders.filter(name => [checks.home, checks.health, checks.ready, checks.documents].some(check => check?.headers?.[name] == null));
|
||||
const report = {
|
||||
base,
|
||||
readOnly: true,
|
||||
checkedAt: new Date().toISOString(),
|
||||
checks,
|
||||
pass: checks.home?.status === 200 && checks.health?.status === 200 && checks.health.apiSuccess === true && checks.ready?.status === 200 && checks.ready.apiSuccess === true && missingHeaders.length === 0,
|
||||
pass: checks.home?.status === 200 && checks.health?.status === 200 && checks.health.apiSuccess === true && checks.ready?.status === 200 && checks.ready.apiSuccess === true && checks.documents?.status === 200 && checks.documents.apiSuccess === true && missingHeaders.length === 0,
|
||||
missingHeaders,
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user