From 8b414222aa8533371e34a496a38ea28a7fcddfd3 Mon Sep 17 00:00:00 2001 From: George Kalpakas Date: Thu, 23 Mar 2017 00:31:47 +0200 Subject: [PATCH] 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 --- aio/firebase.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aio/firebase.json b/aio/firebase.json index 40ba778e18..7604fbf851 100644 --- a/aio/firebase.json +++ b/aio/firebase.json @@ -7,7 +7,7 @@ "cleanUrls": true, "rewrites": [ { - "source": "**", + "source": "**/!(*.*)", "destination": "/index.html" } ]