diff --git a/next.config.js b/next.config.js index 2121e5fb3..e8c9ddb21 100644 --- a/next.config.js +++ b/next.config.js @@ -11,6 +11,17 @@ module.exports = { }, rewrites() { 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', destination: '/search', @@ -27,22 +38,11 @@ module.exports = { source: '/search/designers/:name/:category', destination: '/search', }, - // Search { // This rewrite will also handle `/search/designers` source: '/search/:category', 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=/', - }, ] }, }