Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

add example config for Azure Static Web App #1406

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
14 changes: 14 additions & 0 deletions docs/guide/essentials/history-mode.md
Expand Up @@ -199,6 +199,20 @@ Create a `vercel.json` file under the root directory of your project with the fo
}
```

### Azure Static Web App
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.
```
{
"navigationFallback": {
"rewrite": "/index.html",
"exclude": [
"/assets/*",
"/favicons/*"
]
}
}
```

## Caveat

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:
Expand Down