This commit is contained in:
Julian Lam
2018-06-27 11:24:23 -04:00
parent 625ab1a46b
commit 5cf662e565
3 changed files with 36 additions and 0 deletions

View File

@@ -195,6 +195,11 @@ function setupExpressApp(app, callback) {
app.use(helmet());
app.use(helmet.referrerPolicy({ policy: 'strict-origin-when-cross-origin' }));
app.use(helmet.hsts({
maxAge: parseInt(meta.config['hsts-maxage'], 10) || 31536000,
includeSubdomains: !!parseInt(meta.config['hsts-subdomains'], 10),
preload: !!parseInt(meta.config['hsts-preload'], 10),
}));
app.use(middleware.addHeaders);
app.use(middleware.processRender);
auth.initialize(app, middleware);