diff --git a/next.config.js b/next.config.js index 27bddfae6..3a0fee27b 100644 --- a/next.config.js +++ b/next.config.js @@ -26,6 +26,7 @@ module.exports = withCommerceConfig({ images: { // todo: replace domains for images domains: ['user-images.githubusercontent.com'], + minimumCacheTTL: 60, }, i18n: { locales: ['en-US', 'es'], @@ -46,10 +47,10 @@ module.exports = withCommerceConfig({ // For Vendure, rewrite the local api url to the remote (external) api url. This is required // to make the session cookies work. isVendure && - process.env.NEXT_PUBLIC_VENDURE_LOCAL_URL && { - source: `${process.env.NEXT_PUBLIC_VENDURE_LOCAL_URL}/:path*`, - destination: `${process.env.NEXT_PUBLIC_VENDURE_SHOP_API_URL}/:path*`, - }, + process.env.NEXT_PUBLIC_VENDURE_LOCAL_URL && { + source: `${process.env.NEXT_PUBLIC_VENDURE_LOCAL_URL}/:path*`, + destination: `${process.env.NEXT_PUBLIC_VENDURE_SHOP_API_URL}/:path*`, + }, ].filter(Boolean) }, })