set default font via config

This commit is contained in:
2026-07-18 22:16:56 +02:00
parent 990de4b710
commit 93c042251a
6 changed files with 22 additions and 3 deletions
+1 -1
View File
@@ -486,7 +486,7 @@ export default router => {
// F-023 Security: Validate font against actual files on disk
// The font value is rendered into CSS url() in header.html, so it must be a real filename
if (font) {
const fontsDir = path.join(path.resolve(), 'public/s/fonts');
const fontsDir = cfg.paths.fonts;
try {
const available = (await fs.readdir(fontsDir)).filter(f => /\.(ttf|otf|woff2?)$/i.test(f));
if (!available.includes(font)) {