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 #403main
parent
20976f2ab9
commit
9097c3ae23
|
@ -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…
Reference in New Issue