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).
This commit is contained in:
parent
0930b64c4e
commit
29548244fd
|
@ -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 = '';
|
||||
|
||||
|
|
Loading…
Reference in New Issue