(options)
| 520 | } |
| 521 | |
| 522 | export function handleParseHealth(options) { |
| 523 | return (req, res) => { |
| 524 | res.status(options.state === 'ok' ? 200 : 503); |
| 525 | if (options.state === 'starting') { |
| 526 | res.set('Retry-After', 1); |
| 527 | } |
| 528 | res.json({ |
| 529 | status: options.state, |
| 530 | }); |
| 531 | }; |
| 532 | } |
| 533 | |
| 534 | export function enforceRouteAllowList(req, res, next) { |
| 535 | const config = req.config; |
nothing calls this directly
no outgoing calls
no test coverage detected
searching dependent graphs…