This repository was archived by the owner on Mar 20, 2024. It is now read-only.
This repository was archived by the owner on Mar 20, 2024. It is now read-only.
Faulty logic in param matching for getRouteRegExp #69
Open
Description
The matching of params when creating the regex is breaking since params extracted from the route will have format [":param1", ":param2"]
while the ones added wont have the :
since they are likely used as:
getCacheConfRegExp(cacheConf, {
param1,
param2,
});
Even if you explicitly name the params
getCacheConfRegExp(cacheConf, {
":param1": param1,
":param2": param2,
});
the pattern-replace will fail in the loop a few lines down since it then tries to match ::param1
which doesn't exist in the route
pattern = pattern.replace(`:${paramName}`, params[paramName]);
Metadata
Metadata
Assignees
Labels
No labels