From f1076a709c028b3f3dde660c0fc78222f7345a6a Mon Sep 17 00:00:00 2001 From: Tristan Sokol Date: Sat, 17 Oct 2020 13:10:06 -0700 Subject: [PATCH] Add app engine to history mode docs --- docs/guide/essentials/history-mode.md | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/docs/guide/essentials/history-mode.md b/docs/guide/essentials/history-mode.md index 2b2c50686..4af7d437b 100644 --- a/docs/guide/essentials/history-mode.md +++ b/docs/guide/essentials/history-mode.md @@ -110,7 +110,7 @@ rewrite { Add this to your `firebase.json`: -``` +```json { "hosting": { "public": "dist", @@ -124,6 +124,22 @@ Add this to your `firebase.json`: } ``` +#### Google AppEngine + +Try the following handlers in your `app.yaml`: + +```yaml + - url: /(.*\.(js|css|png|jpg|json|ico|svg))$ + static_files: dist/\1 + upload: dist/.*\.(js|css|png|jpg|json|ico|svg)$ + + # catch all handler to index.html + - url: /.* + static_files: dist/index.html + upload: dist/index.html +``` + + ## 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: