mirror of
https://github.com/DIYgod/RSSHub.git
synced 2025-12-04 11:07:54 +08:00
fix: only collect errors which route path was matched (#4673)
This commit is contained in:
@@ -14,9 +14,9 @@ module.exports = async (ctx, next) => {
|
||||
await next();
|
||||
|
||||
if (!ctx.debug.routes[ctx._matchedRoute]) {
|
||||
ctx.debug.routes[ctx._matchedRoute] = 0;
|
||||
ctx._matchedRoute && (ctx.debug.routes[ctx._matchedRoute] = 0);
|
||||
}
|
||||
ctx.debug.routes[ctx._matchedRoute]++;
|
||||
ctx._matchedRoute && ctx.debug.routes[ctx._matchedRoute]++;
|
||||
|
||||
if (ctx.response.get('X-Koa-Redis-Cache') || ctx.response.get('X-Koa-Memory-Cache')) {
|
||||
ctx.debug.hitCache++;
|
||||
|
||||
Reference in New Issue
Block a user