From 29548244fdcc905da082f208656d61206c518dbf Mon Sep 17 00:00:00 2001 From: Chad Weider Date: Sun, 4 Mar 2012 15:13:15 -0800 Subject: [PATCH] Do not cache 404 responses. This makes DOS attacks way to easy. This really needs to be replaced with an LRU (e.g. a prebuilt middleware). --- node/utils/caching_middleware.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/node/utils/caching_middleware.js b/node/utils/caching_middleware.js index d99023e09..a26e22d18 100644 --- a/node/utils/caching_middleware.js +++ b/node/utils/caching_middleware.js @@ -83,7 +83,7 @@ CachingMiddleware.prototype = new function () { && new Date(res.getHeader('last-modified'))); res.writeHead = old_res.writeHead; - if (status == 200 || status == 404) { + if (status == 200) { // Update cache var buffer = '';