From 9d63df78c5a3dbb51b2398072d3630e1a8d28aa3 Mon Sep 17 00:00:00 2001 From: binaryify Date: Fri, 7 Apr 2023 10:00:10 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E7=BC=93=E5=AD=98=E7=AD=96=E7=95=A5?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0hostname=20#1722?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- util/apicache.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/util/apicache.js b/util/apicache.js index a71c998..57057de 100644 --- a/util/apicache.js +++ b/util/apicache.js @@ -668,8 +668,7 @@ 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.originalUrl || req.url - + var key = req.hostname + (req.originalUrl || req.url) // Remove querystring from key if jsonp option is enabled if (opt.jsonp) { key = url.parse(key).pathname