always inject umami
This commit is contained in:
parent
e56aa1aa03
commit
edcec85b34
@ -121,8 +121,7 @@ export function createApp() {
|
|||||||
if (!cachedIndexHtml) {
|
if (!cachedIndexHtml) {
|
||||||
cachedIndexHtml = await readFile(indexPath, 'utf-8');
|
cachedIndexHtml = await readFile(indexPath, 'utf-8');
|
||||||
}
|
}
|
||||||
const isAuthenticated = authGuard.basicAuthEnabled && authGuard.isAuthorized(req);
|
const html = injectUmami(cachedIndexHtml);
|
||||||
const html = isAuthenticated ? cachedIndexHtml : injectUmami(cachedIndexHtml);
|
|
||||||
res.setHeader('Content-Type', 'text/html; charset=utf-8');
|
res.setHeader('Content-Type', 'text/html; charset=utf-8');
|
||||||
res.send(html);
|
res.send(html);
|
||||||
});
|
});
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user