Stripping query for URL matching.
This commit is contained in:
parent
135fb372f5
commit
0d2bc9024f
|
@ -118,7 +118,9 @@ module.exports = function dissectLink(url) {
|
||||||
return acc;
|
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) {
|
if (match) {
|
||||||
return Object.assign(match, {
|
return Object.assign(match, {
|
||||||
|
|
Loading…
Reference in New Issue