mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
fix(fastapi): remove trailing slashes from fastapi-driven links
With our FastAPI server, trailing slashes causes a 307 redirect which ends up redirecting users to routes which do not contain trailing slashes. This removes trailing slashes from our templates where FastAPI is concerned to avoid unnecessary redirects. There may still be links or usages around which have unnecessary usages of a trailing slash; please keep a look out for these and remove them where possible. Signed-off-by: Kevin Morris <kevr@0cost.org>
This commit is contained in:
parent
e05cfc3375
commit
267f2cb2c4
14 changed files with 58 additions and 58 deletions
|
@ -6,7 +6,7 @@
|
|||
<h2>AUR {% trans %}Login{% endtrans %}</h2>
|
||||
|
||||
{% if request.url.scheme == "http" and config.getboolean("options", "disable_http_login") %}
|
||||
{% set https_login = url_base.replace("http://", "https://") + "/login/" %}
|
||||
{% set https_login = url_base.replace("http://", "https://") + "/login" %}
|
||||
<p>
|
||||
{{ "HTTP login is disabled. Please %sswitch to HTTPs%s if you want to login."
|
||||
| tr
|
||||
|
@ -23,7 +23,7 @@
|
|||
| format("<b>%s</b>" | format(request.user.Username))
|
||||
| safe
|
||||
}}
|
||||
<a href="/logout/?next={{ next }}">[{% trans %}Logout{% endtrans %}]</a>
|
||||
<a href="/logout?next={{ next }}">[{% trans %}Logout{% endtrans %}]</a>
|
||||
</p>
|
||||
{% else %}
|
||||
<form method="post" action="/login?next={{ next }}">
|
||||
|
@ -70,7 +70,7 @@
|
|||
<p>
|
||||
<input class="button" type="submit"
|
||||
value="{% trans %}Login{% endtrans %}">
|
||||
<a href="/passreset/">
|
||||
<a href="/passreset">
|
||||
[{% trans %}Forgot Password{% endtrans %}]
|
||||
</a>
|
||||
<input id="id_referer" type="hidden" name="referer"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue