From 64c7ce7f8816e15e05edf5eb31e73cfe838f8e23 Mon Sep 17 00:00:00 2001 From: Johan Girod Date: Wed, 24 Mar 2021 09:43:29 +0100 Subject: [PATCH] :bug: Corrige les redirections javascript --- mon-entreprise/source/redirects.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mon-entreprise/source/redirects.js b/mon-entreprise/source/redirects.js index e548b107f..060e67406 100644 --- a/mon-entreprise/source/redirects.js +++ b/mon-entreprise/source/redirects.js @@ -4,8 +4,8 @@ import netlifyToml from '../../netlify.toml' export default netlifyToml.redirects .filter(({ from, status }) => status === 301 && !from.startsWith('https')) .map(({ from, to }) => ({ - from: decodeURIComponent(from.replace(/^:.*\//, '')), - to: decodeURIComponent(to.replace(/^:.*\//, '').replace(':splat', '*')), + from: decodeURIComponent(from.replace(/^:.*?\//, '/')), + to: decodeURIComponent(to.replace(/^:.*?\//, '/').replace(':splat', '*')), })) .filter(({ from, to }) => from != to) .map((props) => )