Permalink
Browse files

Remove HTML caching since we are using nonces. (#835)

  • Loading branch information...
1 parent 55a7e97 commit f8f543591170ef07de2f2b0e1a0c1be9a6c35744 @XhmikosR XhmikosR committed on GitHub Dec 22, 2016
Showing with 1 addition and 5 deletions.
  1. +1 −5 app.js
View
@@ -66,17 +66,13 @@ app.use(serveStatic(path.join(__dirname, 'public'), {
}));
app.use(function (req, res, next) {
- var oneHourToSec = 60 * 60;
- var oneHourToMilliSec = 60 * 60 * 1000;
-
// make config available in routes
req.config = config;
// custom headers
res.setHeader('X-Powered-By', 'MaxCDN');
res.setHeader('X-Hello-Human', 'You must be bored. You should work for us. Email jdorfman+theheader@maxcdn.com or @jdorfman on Twitter.');
- res.setHeader('Cache-Control', 'public, max-age=' + oneHourToSec);
- res.setHeader('Expires', new Date(Date.now() + oneHourToMilliSec).toUTCString());
+ res.setHeader('Cache-Control', 'public, max-age=0');
res.setHeader('Last-Modified', new Date().toUTCString());
res.setHeader('Accept-Ranges', 'bytes');

0 comments on commit f8f5435

Please sign in to comment.