From 6320ed04ff833e929b72d80a53f6376e773f08d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Noah=20M=C3=A1rquez=20Vara?= <47271218+xvxnoah@users.noreply.github.com> Date: Thu, 9 Nov 2023 00:16:55 +0100 Subject: [PATCH] Updated staticwebapp --- public/index.html | 2 +- staticwebapp.config.json | 15 ++++++++++++--- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/public/index.html b/public/index.html index aa069f2..9820e05 100644 --- a/public/index.html +++ b/public/index.html @@ -24,7 +24,7 @@ work correctly both with client-side routing and a non-root public URL. Learn how to configure a non-root public URL by running `npm run build`. --> - React App + KASULĂ€ diff --git a/staticwebapp.config.json b/staticwebapp.config.json index 532678f..83a40ea 100644 --- a/staticwebapp.config.json +++ b/staticwebapp.config.json @@ -1,5 +1,5 @@ { - "routes": [ + "routes": [ { "route": "/signup", "allowedRoles": ["anonymous"] @@ -31,6 +31,15 @@ { "route": "/RecipeDetail/:id", "allowedRoles": ["authenticated"] + }, + { + "route": "/*", + "serve": "/index.html", + "statusCode": 200 } - ] -} \ No newline at end of file + ], + "navigationFallback": { + "rewrite": "/index.html", + "exclude": ["/images/*.{png,jpg,gif}", "/css/*", "/js/*"] + } +}