From 74cf61c3e62cf15394880a8ba8c4d24f35c3e3ee Mon Sep 17 00:00:00 2001 From: olli Date: Tue, 29 Oct 2024 19:41:49 +0100 Subject: [PATCH] Try separating routes for static assets --- staticwebapp.config.json | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/staticwebapp.config.json b/staticwebapp.config.json index c3d2a91..8745b4e 100644 --- a/staticwebapp.config.json +++ b/staticwebapp.config.json @@ -7,6 +7,26 @@ } }, "routes": [ + { + "route": "/_app/*", + "statusCode": 200 + }, + { + "route": "/images/*.{png,jpg,gif}", + "statusCode": 200 + }, + { + "route": "/css/*", + "statusCode": 200 + }, + { + "route": "/js/*", + "statusCode": 200 + }, + { + "route": "/fonts/*", + "statusCode": 200 + }, { "route": "/*", "serve": "/index.html", @@ -25,6 +45,8 @@ }, "mimeTypes": { ".json": "application/json", - ".svg": "image/svg+xml" + ".svg": "image/svg+xml", + ".js": "application/javascript", + ".css": "text/css" } }