mirror of
https://github.com/DIYgod/RSSHub.git
synced 2025-12-15 01:30:33 +08:00
app: debug: add hot ips
This commit is contained in:
@@ -4,6 +4,12 @@ module.exports = async (ctx, next) => {
|
||||
}
|
||||
ctx.debug.routes[ctx.request.path]++;
|
||||
|
||||
const ip = ctx.ips[0] || ctx.ip;
|
||||
if (!ctx.debug.ips[ip]) {
|
||||
ctx.debug.ips[ip] = 0;
|
||||
}
|
||||
ctx.debug.ips[ip]++;
|
||||
|
||||
if (ctx.request.path !== '/') {
|
||||
ctx.debug.request++;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user