set max-age to 0 when serving test specs

disable-cache-for-tests
webzwo0i 2021-07-04 03:59:21 +02:00
parent bb7ece7d7e
commit 43f75a54df
1 changed files with 4 additions and 0 deletions

View File

@ -181,6 +181,10 @@ const minify = async (req, res) => {
res.setHeader('expires', expiresDate.toUTCString());
res.setHeader('cache-control', `max-age=${settings.maxAge}`);
}
if (/tests\/frontend\/specs\//.test(filename)) {
res.setHeader('cache-control', 'max-age=0');
}
}
if (!exists) {