Skip to content

Commit

Permalink
Update static web app configuration; modify navigation fallback exclu…
Browse files Browse the repository at this point in the history
…sions, add API route permissions for anonymous access, and enhance global headers for CORS support
  • Loading branch information
Ahzem committed Dec 16, 2024
1 parent 3250ea1 commit 038d9a3
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions staticwebapp.config.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,22 @@
{
"navigationFallback": {
"rewrite": "/index.html",
"exclude": ["/images/*.{png,jpg,gif}", "/css/*", "/js/*", "/api/*"]
"exclude": ["/images/*", "/css/*", "/js/*", "/api/*"]
},
"routes": [
{
"route": "/api/*",
"allowedRoles": ["anonymous"]
},
{
"route": "/*",
"serve": "/index.html",
"statusCode": 200
}
],
"globalHeaders": {
"content-security-policy": "default-src https: 'unsafe-eval' 'unsafe-inline'; object-src 'none'",
"cache-control": "no-cache",
"Access-Control-Allow-Origin": "*"
"Access-Control-Allow-Origin": "*",
"Access-Control-Allow-Methods": "GET, POST, PUT, DELETE, OPTIONS",
"Access-Control-Allow-Headers": "Content-Type, Authorization"
}
}

0 comments on commit 038d9a3

Please sign in to comment.