We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b221d4b commit 74793b5Copy full SHA for 74793b5
1 file changed
app.js
@@ -89,6 +89,11 @@ app.use(helmet.hsts({
89
preload: true
90
}));
91
92
+// routes without sessions
93
+// static files
94
+app.use('/', express.static(__dirname + '/public', { maxAge: config.staticcachetime }));
95
+app.use('/vendor/', express.static(__dirname + '/bower_components', { maxAge: config.staticcachetime }));
96
+
97
//session
98
app.use(session({
99
name: config.sessionname,
@@ -145,10 +150,7 @@ passport.deserializeUser(function (id, done) {
145
150
});
146
151
147
152
148
-//routes
149
-//static files
-app.use('/', express.static(__dirname + '/public'));
-app.use('/vendor/', express.static(__dirname + '/bower_components'));
153
+// routes need sessions
154
//template files
155
app.set('views', __dirname + '/public');
156
//set render engine
0 commit comments