tiktok: use new cookie for each request (#514)

* api: allow passing headers from service handler

* tiktok: use new cookie for each request
This commit is contained in:
jj
2024-05-23 18:29:39 +02:00
committed by GitHub
parent 930faea09a
commit 72246cbc1f
5 changed files with 39 additions and 22 deletions

View File

@@ -192,8 +192,11 @@ export function runAPI(express, app, gitCommit, gitBranch, __dirname) {
const streamInfo = getInternalStream(req.query.id);
if (!streamInfo) return res.sendStatus(404);
streamInfo.headers = req.headers;
streamInfo.headers = {
...req.headers,
...streamInfo.headers
};
return stream(res, { type: 'internal', ...streamInfo });
} catch {
return res.destroy();