Skip to content

Commit

Permalink
fix: add regex check in nextjs redirection (#1858)
Browse files Browse the repository at this point in the history
Co-authored-by: Fionna Chan <[email protected]>
  • Loading branch information
dewanshparashar and fionnachan authored Aug 29, 2024
1 parent 6b52af7 commit 3cf03cf
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion packages/arb-token-bridge-ui/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,18 @@ module.exports = {
async redirects() {
return [
{
source: '/:slug',
source: '/:slug((?!^$|api/|_next/|public/)(?!.*\\.[^/]+$).+)',
missing: [
{
type: 'query',
key: 'destinationChain'
},
{
type: 'header',
key: 'accept',
value: 'image/.*'
}
],
destination: '/?destinationChain=:slug',
permanent: true
}
Expand Down

0 comments on commit 3cf03cf

Please sign in to comment.