We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 16e83b4 commit b5b8f3dCopy full SHA for b5b8f3d
index.js
@@ -61,8 +61,10 @@ module.exports = ({
61
62
return async ({ req, res, ...opts }) => {
63
const hasForce = Boolean(req.query ? req.query.force : parse(req.url.split('?')[1]).force)
64
- const url = urlResolve('http://localhost', req.url)
65
- const key = getKey(url)
+
+ // Because req.url is relative, we need to convert it into an absolute url
66
+ // `u:req.url` is the smallest url length possible
67
+ const key = getKey(urlResolve('u:', req.url))
68
69
const cachedData = await cache.get(key)
70
const hasData = cachedData !== undefined
0 commit comments