🐛 Corrige les redirections javascript
parent
0e85017069
commit
64c7ce7f88
|
@ -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) => <Redirect key={props.from} {...props} exact />)
|
||||
|
|
Loading…
Reference in New Issue