Skip to content

Commit 8b46d76

Browse files
authored
docs: add example config for Azure Static Web App
1 parent 0c7b3cb commit 8b46d76

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

docs/guide/essentials/history-mode.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,20 @@ Create a `vercel.json` file under the root directory of your project with the fo
199199
}
200200
```
201201

202+
### Azure Static Web App
203+
Create a staticwebapp.config.json file in the public folder with the following configuration. If the route does not exist, Azure will redirects all requests to index.html except for assets and favicons.
204+
```
205+
{
206+
"navigationFallback": {
207+
"rewrite": "/index.html",
208+
"exclude": [
209+
"/assets/*",
210+
"/favicons/*"
211+
]
212+
}
213+
}
214+
```
215+
202216
## Caveat
203217

204218
There is a caveat to this: Your server will no longer report 404 errors as all not-found paths now serve up your `index.html` file. To get around the issue, you should implement a catch-all route within your Vue app to show a 404 page:

0 commit comments

Comments
 (0)