From 9097c3ae234c7990e31917581363bdf060707285 Mon Sep 17 00:00:00 2001 From: Ben Busby Date: Wed, 13 Oct 2021 20:55:26 -0600 Subject: [PATCH] Add /home endpoint to header template Used in header templates for navigating back to the home page when behind a reverse proxy config where the app is running from a subpath of a domain (i.e. "https://something/whoogle/") Fixes #403 --- app/routes.py | 5 +++++ app/templates/header.html | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/app/routes.py b/app/routes.py index c217d59..b5bcca2 100644 --- a/app/routes.py +++ b/app/routes.py @@ -115,6 +115,11 @@ def healthz(): return '' +@app.route('/home', methods=['GET']) +def home(): + return redirect(url_for('.index')) + + @app.route('/', methods=['GET']) @auth_required def index(): diff --git a/app/templates/header.html b/app/templates/header.html index 3a23f54..0ba701c 100644 --- a/app/templates/header.html +++ b/app/templates/header.html @@ -4,7 +4,7 @@
-