Skip to content

Commit

Permalink
Merge branch 'dev' into feature/DS-989/changemaker-modal
Browse files Browse the repository at this point in the history
* dev:
  Support wildcards in redirects. (#372)
  • Loading branch information
yvonnetangsu committed Dec 10, 2024
2 parents 3e26f1d + fa4ca7b commit a49fa1f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion utilities/data/getStoryblokRedirects.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ const sanitizeRedirectCode = (code) => {
const sanitizeSourcePath = (str) => {
const parts = str.split('?');
const path = parts[0];
return path;
// Replace '*' with '(.*)' to match dynamic routes
return path.replace(/\*/g, '(.*)');
};

/**
Expand Down

0 comments on commit a49fa1f

Please sign in to comment.