feat: add PWA support (manifest, service worker, icons)

This commit is contained in:
Simon
2026-04-22 22:28:17 +02:00
parent d9189d558d
commit 6b54e3c813
14 changed files with 161 additions and 0 deletions
+5
View File
@@ -25,6 +25,7 @@ app.use(helmet({
fontSrc: ["'self'", 'https://fonts.gstatic.com'],
imgSrc: ["'self'", 'data:'],
connectSrc: ["'self'", 'https://api.open-meteo.com'],
workerSrc: ["'self'"],
frameAncestors: ["'none'"],
objectSrc: ["'none'"],
},
@@ -32,6 +33,10 @@ app.use(helmet({
}));
app.use(express.json());
app.use(cookieParser());
app.get('/sw.js', (req, res, next) => {
res.setHeader('Cache-Control', 'no-cache');
next();
});
app.use(express.static(path.join(__dirname, 'public')));
app.use('/api', routes);
app.use('/api/files', filesRouter);