Skip to content

Commit

Permalink
Configure Vite for base path and add static web app configuration wit…
Browse files Browse the repository at this point in the history
…h navigation fallback and global headers
  • Loading branch information
Ahzem committed Dec 16, 2024
1 parent 109eba0 commit 3250ea1
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
18 changes: 18 additions & 0 deletions staticwebapp.config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"navigationFallback": {
"rewrite": "/index.html",
"exclude": ["/images/*.{png,jpg,gif}", "/css/*", "/js/*", "/api/*"]
},
"routes": [
{
"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": "*"
}
}
1 change: 1 addition & 0 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ export default defineConfig({
global: 'globalThis',
'process.env': process.env
},
base: '/',
resolve: {
alias: {
'stream': 'stream-browserify',
Expand Down

0 comments on commit 3250ea1

Please sign in to comment.