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
main
Ben Busby 2021-10-13 20:55:26 -06:00
parent 20976f2ab9
commit 9097c3ae23
No known key found for this signature in database
GPG Key ID: 339B7B7EB5333D14
2 changed files with 7 additions and 2 deletions

View File

@ -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():

View File

@ -4,7 +4,7 @@
<form class="search-form Pg70bf"
id="search-form"
method="{{ 'GET' if config.get_only else 'POST' }}">
<a class="logo-link mobile-logo" href="/">
<a class="logo-link mobile-logo" href="home">
<div id="mobile-header-logo">
{{ logo|safe }}
</div>
@ -35,7 +35,7 @@
{% else %}
<header>
<div class="logo-div">
<a class="logo-link" href="/">
<a class="logo-link" href="home">
<div class="desktop-header-logo">
{{ logo|safe }}
</div>