Skip to content

Commit

Permalink
Add staticwebapp azure config to handle dynamic route access
Browse files Browse the repository at this point in the history
  • Loading branch information
OLILHR committed Oct 29, 2024
1 parent 1fe5a81 commit 6a39410
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions staticwebapp.config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"trailingSlash": "auto",
"routes": [
{
"route": "/*",
"serve": "/index.html",
"statusCode": 200
}
],
"navigationFallback": {
"rewrite": "index.html",
"exclude": ["/images/*.{png,jpg,gif}", "/css/*", "/js/*", "/fonts/*"]
},
"responseOverrides": {
"400": {
"rewrite": "/"
},
"401": {
"redirect": "/",
"statusCode": 302
},
"403": {
"rewrite": "/"
},
"404": {
"rewrite": "/"
}
},
"globalHeaders": {
"content-security-policy": "default-src https: 'unsafe-eval' 'unsafe-inline'; object-src 'none'"
},
"mimeTypes": {
".json": "text/json"
}
}

0 comments on commit 6a39410

Please sign in to comment.