Browse Source
Attempt to address #103 using the hypothesis that css/js files may be modified (minified?) before being hashed in some situations
fix-133-memory-crash
Dan Janosik
6 years ago
No known key found for this signature in database
GPG Key ID: C6F8CE9FFDB2CED2
1 changed files with
9 additions and
0 deletions
-
app.js
|
|
@ -71,6 +71,15 @@ app.use(session({ |
|
|
|
resave: false, |
|
|
|
saveUninitialized: false |
|
|
|
})); |
|
|
|
|
|
|
|
app.use(function(req, res, next) { |
|
|
|
if (req.url.match(/^.*(css|js)$/)) { |
|
|
|
res.setHeader("Cache-Control", "no-transform"); |
|
|
|
} |
|
|
|
|
|
|
|
next(); |
|
|
|
}); |
|
|
|
|
|
|
|
app.use(express.static(path.join(__dirname, 'public'))); |
|
|
|
|
|
|
|
process.on("unhandledRejection", (reason, p) => { |
|
|
|