Fix full user agent being saved

This commit is contained in:
Ajay Ramachandran 2021-08-01 02:46:21 -04:00
parent 8f0f01e6b2
commit ee8d20a43d

View file

@ -551,7 +551,7 @@ function preprocessInput(req: Request) {
}
});
const userAgent = req.get("user-agent") ?? parseUserAgent(req.get("User-Agent")) ?? "";
const userAgent = req.query.userAgent ?? req.body.userAgent ?? parseUserAgent(req.get("user-agent")) ?? "";
return {videoID, userID, service, videoDuration, videoDurationParam, segments, userAgent};
}