From 0e5cbb1fc8a27fe1c90332a98df1ddbae18f3f35 Mon Sep 17 00:00:00 2001 From: Anthony LC Date: Thu, 27 Jun 2024 14:58:48 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B(app-desk)=20force=20redirect=20on?= =?UTF-8?q?=20mail-domains/[slug]?= 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 mail-domains pages at build time. But we can't do that because users can create a mail at runtime. So we redirect thanks to ngnix when we see that a mail 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 f01b29e..a0acf50 100644 --- a/src/frontend/apps/desk/conf/default.conf +++ b/src/frontend/apps/desk/conf/default.conf @@ -12,6 +12,10 @@ server { error_page 404 /teams/[id]/; } + location /mail-domains/ { + error_page 404 /mail-domains/[slug]/; + } + error_page 404 /404.html; location = /404.html { internal;