From d09fbe8284a0375f65b8a5e3fce5afffedf4c2ec Mon Sep 17 00:00:00 2001 From: Mcat12 Date: Sat, 16 Feb 2019 12:21:52 -0800 Subject: [PATCH] Support refreshing on GitHub Pages GitHub Pages does not support client-side routing, so when a user is on `/whitelist` and refreshes, they get a 404 because there is no `whitelist` file on the server. This is fixed by adding a custom 404 page which handles redirecting to index.html with the original path. Credit for this goes to https://github.com/rafrex/spa-github-pages Signed-off-by: Mcat12 --- public/404.html | 41 +++++++++++++++++++++++++++++++++++++++++ public/index.html | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 73 insertions(+) create mode 100644 public/404.html diff --git a/public/404.html b/public/404.html new file mode 100644 index 0000000..7ff8725 --- /dev/null +++ b/public/404.html @@ -0,0 +1,41 @@ + + + + + Pi-hole Web Interface + + + + + diff --git a/public/index.html b/public/index.html index 7cfccf5..7536bea 100644 --- a/public/index.html +++ b/public/index.html @@ -6,6 +6,38 @@ Pi-hole Web Interface + + + +