use 24 hours interval if the interval value (config.cache_control_interval) is set to over 1000. fixes cache control for older config.cache_control_interval values

This commit is contained in:
teddit 2022-01-29 23:53:51 +01:00
parent 01c41c7adf
commit 265c33fcd2
1 changed files with 12 additions and 12 deletions

View File

@ -20,8 +20,8 @@ module.exports.removeCacheFiles = function() {
if(config.cache_control) {
deleteStatic();
const hours = config.cache_control_interval;
if (hours < 1 || isNaN(hours)) {
let hours = config.cache_control_interval;
if (hours < 1 || hours > 10000 || isNaN(hours)) {
hours = 24;
}