From 8411a3094373a18aad9b25a6bdbd09c19e1c81bd Mon Sep 17 00:00:00 2001 From: Jiang Bohan Date: Tue, 14 Apr 2026 21:30:40 +0800 Subject: [PATCH] fix(web): add /uploads/* rewrite for self-hosted deployments On self-hosted deployments where the frontend is the public entrypoint, uploaded files return 404 because /uploads/* requests aren't proxied to the backend. Add a rewrite rule following the existing pattern for /api/*, /ws, and /auth/*. Closes #1004 --- apps/web/next.config.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/apps/web/next.config.ts b/apps/web/next.config.ts index 548b211710..672bed443c 100644 --- a/apps/web/next.config.ts +++ b/apps/web/next.config.ts @@ -45,6 +45,10 @@ const nextConfig: NextConfig = { source: "/auth/:path*", destination: `${remoteApiUrl}/auth/:path*`, }, + { + source: "/uploads/:path*", + destination: `${remoteApiUrl}/uploads/:path*`, + }, ]; }, };