angular-docs-cn/aio/firebase.json
George Kalpakas 8b414222aa fix(aio): do not fallback to index.html for file requests (#15401)
Previously, all URLs were rewritten to `index.html` in order to support
deep-linking. This works when navigating to URLs that correspond to existing
resources. E.g. navigating to `/tutorial` returns `index.html` and then the
`DocViewer` takes over and requests `tutorial.json`.
Navigating to a non-existent URL (e.g. `/foo`), will return `index.html`, which
in turn requests (the non-existent) `foo.json` and throws an error when trying
to parse the returned `index.html` as JSON.

This commit fixes it by only rewriting URLs that do not request a file (i.e. do
not include a `.` in the last path segment).

Fixes #15398
2017-03-22 15:31:47 -07:00

16 lines
232 B
JSON

{
"database": {
"rules": "database.rules.json"
},
"hosting": {
"public": "dist",
"cleanUrls": true,
"rewrites": [
{
"source": "**/!(*.*)",
"destination": "/index.html"
}
]
}
}