Error log and now showing video on play in small player on desktop

This commit is contained in:
Kasper Rynning-Tønnesen
2018-06-21 18:49:52 +02:00
parent 58d26e4197
commit 48099e93d8
5 changed files with 25 additions and 5 deletions

View File

@@ -74,6 +74,7 @@ app.get('/robots.txt', function (req, res) {
app.use(function (req, res, next) {
var cookie = req.cookies._uI;
if (cookie === undefined) {
console.error((new Date), "couldn't fetch cookie for some reason, maybe no cookie exists?", req, "couldn't fetch cookie for some reason, maybe no cookie exists?");
var user_name = Functions.hash_pass(Functions.rndName(uniqid.time(), 15));
res.cookie('_uI', user_name, {
maxAge: 365 * 10000 * 3600000,
@@ -82,6 +83,7 @@ app.use(function (req, res, next) {
sameSite: true,
});
} else {
//process.stderr.write((new Date), "couldn't fetch cookie for some reason, maybe no cookie exists?", req, "couldn't fetch cookie for some reason, maybe no cookie exists?");
res.cookie('_uI', cookie, {
maxAge: 365 * 10000 * 3600000,
httpOnly: true,