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
pull/461/head
Ben Busby 3 years ago
parent 20976f2ab9
commit 9097c3ae23
No known key found for this signature in database
GPG Key ID: 339B7B7EB5333D14

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

@ -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>

Loading…
Cancel
Save