mirror of
https://github.com/wukko/cobalt.git
synced 2025-01-22 10:46:19 +01:00
api/itunnel: pass itunnel object by reference
This commit is contained in:
parent
19ade7c905
commit
c07940bfa4
2 changed files with 2 additions and 2 deletions
|
@ -313,7 +313,7 @@ export const runAPI = async (express, app, __dirname, isPrimary = true) => {
|
||||||
...Object.entries(req.headers)
|
...Object.entries(req.headers)
|
||||||
]);
|
]);
|
||||||
|
|
||||||
return stream(res, { type: 'internal', ...streamInfo });
|
return stream(res, { type: 'internal', data: streamInfo });
|
||||||
};
|
};
|
||||||
|
|
||||||
app.get('/itunnel', itunnelHandler);
|
app.get('/itunnel', itunnelHandler);
|
||||||
|
|
|
@ -10,7 +10,7 @@ export default async function(res, streamInfo) {
|
||||||
return await stream.proxy(streamInfo, res);
|
return await stream.proxy(streamInfo, res);
|
||||||
|
|
||||||
case "internal":
|
case "internal":
|
||||||
return internalStream(streamInfo, res);
|
return internalStream(streamInfo.data, res);
|
||||||
|
|
||||||
case "merge":
|
case "merge":
|
||||||
return stream.merge(streamInfo, res);
|
return stream.merge(streamInfo, res);
|
||||||
|
|
Loading…
Reference in a new issue