api: disable youtube HLS by default & add env to enable it

This commit is contained in:
wukko
2025-06-17 13:21:16 +06:00
parent 1e7406de9d
commit af99e7218c
3 changed files with 22 additions and 2 deletions

View File

@@ -156,6 +156,7 @@ export const runAPI = async (express, app, __dirname, isPrimary = true) => {
return fail(res, `error.api.auth.key.${error}`);
}
req.isApiKey = true;
return next();
});
@@ -264,6 +265,7 @@ export const runAPI = async (express, app, __dirname, isPrimary = true) => {
patternMatch: parsed.patternMatch,
params: normalizedRequest,
isSession: req.isSession ?? false,
isApiKey: req.isApiKey ?? false,
});
res.status(result.status).json(result.body);