feat(core): add a new environment variable to configure the output format (#22738)

This commit is contained in:
Serhii Hospodarchuk
2026-07-16 23:01:26 +08:00
committed by GitHub
parent fd185c3edb
commit bd24a2fdcd
3 changed files with 5 additions and 2 deletions
+1 -1
View File
@@ -19,7 +19,7 @@ const middleware: MiddlewareHandler = async (ctx, next) => {
}
const requestPath = ctx.req.path;
const format = `:${ctx.req.query('format') || 'rss'}`;
const format = `:${ctx.req.query('format') || config.format}`;
const limit = ctx.req.query('limit') ? `:${ctx.req.query('limit')}` : '';
const key = 'rsshub:koa-redis-cache:' + h64ToString(requestPath + format + limit);
const controlKey = 'rsshub:path-requested:' + h64ToString(requestPath + format + limit);