From 56df81ef845ef4d0cfeae7a47341b49ae93b0dcd Mon Sep 17 00:00:00 2001 From: Anthony LC Date: Tue, 26 Mar 2024 12:45:02 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B(app-desk)=20force=20redirect=20on?= =?UTF-8?q?=20teams/[id]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When we use the static mode, Next.js want that we build our team pages at build time. But we can't do that because users can create a team at runtime. So we redirect thanks to ngnix when we see that a team page is not found. --- src/frontend/apps/desk/conf/default.conf | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/frontend/apps/desk/conf/default.conf b/src/frontend/apps/desk/conf/default.conf index fe8f1cb..f01b29e 100644 --- a/src/frontend/apps/desk/conf/default.conf +++ b/src/frontend/apps/desk/conf/default.conf @@ -8,6 +8,10 @@ server { try_files $uri index.html $uri/ =404; } + location /teams/ { + error_page 404 /teams/[id]/; + } + error_page 404 /404.html; location = /404.html { internal;