insert copyright headers for images
Sonarqube Scanner / Prepare environment (push) Successful in 7s
Sonarqube Scanner / Build and test (push) Successful in 30s
Sonarqube Scanner / SonarQube analysis (push) Successful in 1m6s
Sonarqube Scanner / Deploy to Server (push) Successful in 6s

This commit is contained in:
Florian Zumpe
2026-10-04 10:14:40 +02:00
parent 3a682f2b30
commit d3311cce06
18 changed files with 382 additions and 12 deletions
+2
View File
@@ -2,6 +2,7 @@ import express from 'express';
import path from 'node:path';
import { fileURLToPath } from 'node:url';
import { offlineManifest } from './src/services/offline-manifest.js';
import { setAppImageCopyright } from './src/services/copyright.js';
import { config, ensureRuntimeDirectories } from './src/config.js';
import { openDatabase } from './src/database.js';
import { createApiRouter } from './src/routes/api.js';
@@ -30,6 +31,7 @@ app.use(express.static(publicDirectory, {
lastModified: true,
maxAge: 0,
setHeaders(res, filePath) {
setAppImageCopyright(res, filePath);
const extension = path.extname(filePath).toLowerCase();
const authoredAsset = ['.html', '.css', '.js'].includes(extension);
res.setHeader(