From d558d977478052fcb1d02507723c6c75dfcbf5dc Mon Sep 17 00:00:00 2001 From: iain nash Date: Mon, 16 Dec 2024 22:36:06 -0500 Subject: [PATCH] Fix redirect --- www/next.config.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/www/next.config.js b/www/next.config.js index e97586d..65919e5 100644 --- a/www/next.config.js +++ b/www/next.config.js @@ -2,18 +2,20 @@ module.exports = { webpack5: true, async rewrites() { const rewrites = [ - { source: '/next-api/:path*', destination: '/api/:path*' }, + // { source: '/next-api/:path*', destination: '/api/:path*' }, + {source: '/api/:path*', destination: process.env.API_URL + 'api/:path*'} ] // forward /api/ requests to the real api // this should be done on the CDN level in production - rewrites.push({ - source: '/api/:path*', - destination: process.env.API_URL + '/api/:path*', - }) + // rewrites.push({ + // source: '/api/:path*', + // destination: process.env.API_URL + '/api/:path*', + // }) return rewrites }, + skipTrailingSlashRedirect: true, sentry: { disableServerWebpackPlugin: process.env.SENTRY_AUTH_TOKEN === undefined, disableClientWebpackPlugin: process.env.SENTRY_AUTH_TOKEN === undefined,