mirror of
https://github.com/vercel/commerce.git
synced 2025-04-29 14:27:50 +00:00
Moved search rewrites
This commit is contained in:
parent
5ab999ac95
commit
588628fca1
@ -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=/',
|
|
||||||
},
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user