Stripping query for URL matching.
This commit is contained in:
parent
d402916d5e
commit
96a041001b
|
@ -118,7 +118,9 @@ module.exports = function dissectLink(url) {
|
|||
return acc;
|
||||
}
|
||||
|
||||
const match = host.pattern.match(url.replace(/(https?:\/\/)|(\/)+/g, '$1$2')); // remove double slashes
|
||||
// const match = host.pattern.match(url.replace(/(https?:\/\/)|(\/)+/g, '$1$2')); // remove double slashes
|
||||
const { origin, pathname } = new URL(url);
|
||||
const match = host.pattern.match(`${origin}${pathname}`); // remove double slashes
|
||||
|
||||
if (match) {
|
||||
return Object.assign(match, {
|
||||
|
|
Loading…
Reference in New Issue