Skip to content

Commit

Permalink
use regex for adjacent urls
Browse files Browse the repository at this point in the history
  • Loading branch information
Geometrically committed Nov 7, 2023
1 parent 3b88562 commit e92e41e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ export default {
const cacheResponse = await cache.match(request);

const url = new URL(request.url);
const key = decodeURIComponent(url.pathname.slice(1));
const key = decodeURIComponent(url.pathname.replace(/\/+/g, '/').slice(1));

const urlData = extractUrlData(key);

Expand Down

0 comments on commit e92e41e

Please sign in to comment.