fix: #1833 apicache 调整

This commit is contained in:
binaryify 2023-12-29 16:54:21 +08:00
parent 1c3050d6ef
commit 61a1a17318

View File

@ -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