UNPKG

@workablehr/riviere

Version:

log inbound/outbound HTTP traffic

14 lines (11 loc) 317 B
module.exports = (ctx, healthConfig) => { if (!healthConfig) { return false; } const method = ctx.request.method; for (let i = 0; i < healthConfig.length; i++) { const h = healthConfig[i]; if (ctx.request.path === h.path && method === h.method.toUpperCase()) return true; } return false; };