From 61a1a17318184d7134204503ca45dc08abac735e Mon Sep 17 00:00:00 2001 From: binaryify Date: Fri, 29 Dec 2023 16:54:21 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20#1833=20apicache=20=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- util/apicache.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/util/apicache.js b/util/apicache.js index 57057de..072559e 100644 --- a/util/apicache.js +++ b/util/apicache.js @@ -668,7 +668,10 @@ function ApiCache() { req.apicacheTimer = new Date() // In Express 4.x the url is ambigious based on where a router is mounted. originalUrl will give the full Url - var key = req.hostname + (req.originalUrl || req.url) + var key = + req.hostname + + (req.originalUrl || req.url) + + JSON.stringify(req.cookies) // Remove querystring from key if jsonp option is enabled if (opt.jsonp) { key = url.parse(key).pathname