aboutsummaryrefslogtreecommitdiff
path: root/src/main/resources
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2022-12-07 16:13:57 +0300
committerGravatar Vitaly Takmazov2022-12-07 17:38:55 +0300
commit5e0500933d2f805fe879ced9171c65839c72579b (patch)
tree60eeb84ac103c3f160dda3c2adbd1a10c489e8ec /src/main/resources
parent206742aed99a20fea014c83408fb44ff36089351 (diff)
Login: use `Referer` header to redirect after the successful login
Diffstat (limited to 'src/main/resources')
-rw-r--r--src/main/resources/templates/views/login_success.html13
-rw-r--r--src/main/resources/templates/views/partial/navigation.html2
2 files changed, 1 insertions, 14 deletions
diff --git a/src/main/resources/templates/views/login_success.html b/src/main/resources/templates/views/login_success.html
deleted file mode 100644
index ee71f12f..00000000
--- a/src/main/resources/templates/views/login_success.html
+++ /dev/null
@@ -1,13 +0,0 @@
-<!DOCTYPE html>
-<html lang="en">
-<head>
- <meta charset="UTF-8">
- <title>Blank window</title>
-</head>
-<body>
- <script type="text/javascript">
- window.opener.postMessage("{{ hash }}", "*");
- window.close();
- </script>
-</body>
-</html>
diff --git a/src/main/resources/templates/views/partial/navigation.html b/src/main/resources/templates/views/partial/navigation.html
index 184c8f2b..159c3d21 100644
--- a/src/main/resources/templates/views/partial/navigation.html
+++ b/src/main/resources/templates/views/partial/navigation.html
@@ -33,7 +33,7 @@
<span class="icon-title desktop">{{ i18n("messages","link.postMessage") }}</span>
</a>
{% else %}
- <a class="a-login" href="/login" rel="nofollow">
+ <a class="a-login" href="/login?retpath={{ retpath | default('/') }}" rel="nofollow">
<i data-icon="ei-user" data-size="s"></i>
<span class="icon-title desktop">{{ i18n("messages", "link.Login") }}</span>
</a>