mirror of
https://github.com/zadam/trilium.git
synced 2025-11-08 06:15:48 +01:00
use trilium version number in asset paths to avoid caching issues WIP
This commit is contained in:
@@ -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
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user