Moved search rewrites

This commit is contained in:
Luis Alvarez 2020-10-27 03:38:28 -05:00
parent 5ab999ac95
commit 588628fca1

View File

@ -11,6 +11,17 @@ module.exports = {
}, },
rewrites() { rewrites() {
return [ return [
{
source: '/checkout',
destination: '/api/bigcommerce/checkout',
},
// The logout is also an action so this route is not required, but it's also another way
// you can allow a logout!
{
source: '/logout',
destination: '/api/bigcommerce/customers/logout?redirect_to=/',
},
// Rewrites for /search
{ {
source: '/:locale/search', source: '/:locale/search',
destination: '/search', destination: '/search',
@ -27,22 +38,11 @@ module.exports = {
source: '/search/designers/:name/:category', source: '/search/designers/:name/:category',
destination: '/search', destination: '/search',
}, },
// Search
{ {
// This rewrite will also handle `/search/designers` // This rewrite will also handle `/search/designers`
source: '/search/:category', source: '/search/:category',
destination: '/search', destination: '/search',
}, },
{
source: '/checkout',
destination: '/api/bigcommerce/checkout',
},
// The logout is also an action so this route is not required, but it's also another way
// you can allow a logout!
{
source: '/logout',
destination: '/api/bigcommerce/customers/logout?redirect_to=/',
},
] ]
}, },
} }