Skip to content

Commit

Permalink
fix: Binaryify#1833 apicache 调整
Browse files Browse the repository at this point in the history
  • Loading branch information
Binaryify committed Dec 29, 2023
1 parent 1c3050d commit 61a1a17
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion util/apicache.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 61a1a17

Please sign in to comment.