Prevent browser caching of user projects list
Deploy Standortplaner / deploy (push) Successful in 16s Details

This commit is contained in:
Johannes Baumeister 2026-07-06 13:06:08 +02:00
parent 4659562b1d
commit 89a3a7cd6b
1 changed files with 5 additions and 0 deletions

View File

@ -166,6 +166,11 @@ async function checkProjectAccess(req, requestedProjectIdentifier, client) {
// API-Endpunkt zur Rückgabe der erlaubten Projekte des angemeldeten Nutzers
app.get('/api/user/projekte', async (req, res) => {
// Verhindere Caching der Projektliste durch den Browser
res.set('Cache-Control', 'no-store, no-cache, must-revalidate, private');
res.set('Pragma', 'no-cache');
res.set('Expires', '0');
const auth = getAllowedProjects(req);
if (!auth) {
log('Unauthorized request to /api/user/projekte (missing headers)');