From febf3e2218856995807d990d3b52931eceaef1fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kornel=20Lesi=C5=84ski?= Date: Tue, 31 May 2016 16:06:52 +0100 Subject: [PATCH] Assume HTTP/1.1+ and always compare host --- index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/index.js b/index.js index 6eb1c6c..1a4990f 100644 --- a/index.js +++ b/index.js @@ -103,6 +103,7 @@ CachePolicy.prototype = { // The presented effective request URI and that of the stored response match, and return (!this._req.url || this._req.url === req.url) && + (this._reqHeaders.host === req.headers.host) && // the request method associated with the stored response allows it to be used for the presented request, and (!this._req.method || this._req.method === req.method) && // selecting header fields nominated by the stored response (if any) match those presented, and