Write to static homer log file
This commit is contained in:
+1
-3
@@ -13,9 +13,7 @@ function homer(server)
|
||||
server.on('newroom', (room) =>
|
||||
{
|
||||
const fileName =
|
||||
path.join(
|
||||
process.env.MEDIASOUP_HOMER_OUTPUT,
|
||||
`${(new Date()).toISOString()}_${room.id}`);
|
||||
path.join(process.env.MEDIASOUP_HOMER_OUTPUT);
|
||||
|
||||
const stream = fs.createWriteStream(fileName, { flags: 'a' });
|
||||
|
||||
|
||||
+1
-1
@@ -170,7 +170,7 @@ const actions = {
|
||||
});
|
||||
|
||||
// File exists, stream it to user
|
||||
if (parsedUrl.pathname.indexOf('svg') > -1) {headers = {'Content-Type': 'image/svg+xml'}};
|
||||
if (parsedUrl.pathname.indexOf('svg') === parsedUrl.pathname.length -3) {headers = {'Content-Type': 'image/svg+xml'}};
|
||||
res.writeHead(200, headers);
|
||||
stream.pipe(res);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user