fix: change Next.js rewrites to redirects for short links to prevent proxy 500 error
This commit is contained in:
@@ -2,11 +2,12 @@ import type { NextConfig } from "next";
|
|||||||
|
|
||||||
const nextConfig: NextConfig = {
|
const nextConfig: NextConfig = {
|
||||||
output: 'standalone',
|
output: 'standalone',
|
||||||
async rewrites() {
|
async redirects() {
|
||||||
return [
|
return [
|
||||||
{
|
{
|
||||||
source: '/l/:slug',
|
source: '/l/:slug',
|
||||||
destination: `${process.env.INTERNAL_BACKEND_URL || 'http://localhost:4001'}/l/:slug`
|
destination: '/api/l/:slug',
|
||||||
|
permanent: false
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user