Merge branch 'master' into develop

This commit is contained in:
Barış Soner Uşaklı
2023-05-13 21:30:37 -04:00
6 changed files with 29 additions and 6 deletions

View File

@@ -197,13 +197,17 @@ function setupHelmet(app) {
if (meta.config['hsts-enabled']) {
options.hsts = {
maxAge: meta.config['hsts-maxage'],
maxAge: Math.max(0, meta.config['hsts-maxage']),
includeSubDomains: !!meta.config['hsts-subdomains'],
preload: !!meta.config['hsts-preload'],
};
}
app.use(helmet(options));
try {
app.use(helmet(options));
} catch (err) {
winston.error(`[startup] unable to initialize helmet \n${err.stack}`);
}
}