This commit is contained in:
idittrich-valueon 2025-05-07 11:13:57 +02:00
parent 26b068f4ce
commit 2049aef9e8
3 changed files with 11 additions and 22 deletions

View file

@ -28,8 +28,8 @@ jobs:
env:
CI: false # Verhindert, dass Warnungen den Build stoppen
- name: Copy web.config to build folder
run: cp web.config build/
- name: Copy config to build folder
run: cp staticwebapp.config.json build/
- name: 'Deploy to Azure Web App'
uses: azure/webapps-deploy@v3

9
staticwebapp.config.json Normal file
View file

@ -0,0 +1,9 @@
{
"navigationFallback": {
"rewrite": "/index.html",
"exclude": ["/static/*", "/images/*", "/*.{png,jpg,gif,ico,json}"]
},
"mimeTypes": {
".json": "text/json"
}
}

View file

@ -1,20 +0,0 @@
<?xml version="1.0"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="React Routes" stopProcessing="true">
<match url=".*" />
<conditions logicalGrouping="MatchAll">
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
</conditions>
<action type="Rewrite" url="/" />
</rule>
</rules>
</rewrite>
<staticContent>
<mimeMap fileExtension=".json" mimeType="application/json" />
</staticContent>
</system.webServer>
</configuration>