fix: change Next.js rewrites to redirects for short links to prevent proxy 500 error

This commit is contained in:
Mohan Ki
2026-07-27 16:50:20 +05:30
parent df8b49f387
commit fba969dd55
+3 -2
View File
@@ -2,11 +2,12 @@ import type { NextConfig } from "next";
const nextConfig: NextConfig = {
output: 'standalone',
async rewrites() {
async redirects() {
return [
{
source: '/l/:slug',
destination: `${process.env.INTERNAL_BACKEND_URL || 'http://localhost:4001'}/l/:slug`
destination: '/api/l/:slug',
permanent: false
}
];
}