use trilium version number in asset paths to avoid caching issues WIP

This commit is contained in:
zadam
2022-10-26 23:50:54 +02:00
parent 441a59305b
commit b499640db8
28 changed files with 124 additions and 83 deletions

View File

@@ -5,13 +5,20 @@ const optionService = require('../services/options');
const myScryptService = require('../services/my_scrypt');
const log = require('../services/log');
const passwordService = require("../services/password");
const assetPath = require("../services/asset_path");
function loginPage(req, res) {
res.render('login', { failedAuth: false });
res.render('login', {
failedAuth: false,
assetPath: assetPath
});
}
function setPasswordPage(req, res) {
res.render('set_password', { error: false });
res.render('set_password', {
error: false,
assetPath: assetPath
});
}
function setPassword(req, res) {
@@ -32,7 +39,10 @@ function setPassword(req, res) {
}
if (error) {
res.render('set_password', { error });
res.render('set_password', {
error,
assetPath: assetPath
});
return;
}
@@ -62,7 +72,10 @@ function login(req, res) {
// note that logged IP address is usually meaningless since the traffic should come from a reverse proxy
log.info(`WARNING: Wrong password from ${req.ip}, rejecting.`);
res.render('login', {'failedAuth': true});
res.render('login', {
failedAuth: true,
assetPath: assetPath
});
}
}