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 ''
|
return ''
|
||||||
|
|
||||||
|
|
||||||
|
@app.route('/home', methods=['GET'])
|
||||||
|
def home():
|
||||||
|
return redirect(url_for('.index'))
|
||||||
|
|
||||||
|
|
||||||
@app.route('/', methods=['GET'])
|
@app.route('/', methods=['GET'])
|
||||||
@auth_required
|
@auth_required
|
||||||
def index():
|
def index():
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
<form class="search-form Pg70bf"
|
<form class="search-form Pg70bf"
|
||||||
id="search-form"
|
id="search-form"
|
||||||
method="{{ 'GET' if config.get_only else 'POST' }}">
|
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">
|
<div id="mobile-header-logo">
|
||||||
{{ logo|safe }}
|
{{ logo|safe }}
|
||||||
</div>
|
</div>
|
||||||
|
@ -35,7 +35,7 @@
|
||||||
{% else %}
|
{% else %}
|
||||||
<header>
|
<header>
|
||||||
<div class="logo-div">
|
<div class="logo-div">
|
||||||
<a class="logo-link" href="/">
|
<a class="logo-link" href="home">
|
||||||
<div class="desktop-header-logo">
|
<div class="desktop-header-logo">
|
||||||
{{ logo|safe }}
|
{{ logo|safe }}
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue