We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5ac75ce commit 43fd1aeCopy full SHA for 43fd1ae
1 file changed
src/main/resources/META-INF/resources/webjars/public/login/login.js
@@ -28,7 +28,11 @@ define([
28
current.success();
29
if (result && result.success && result.redirect) {
30
// Success login, use the provided redirection URL
31
- window.location.replace('//' + location.host + result.redirect + (current.target || '#/'));
+ const url = new URL(window.location.href);
32
+ const pathParts = url.pathname.split('/').filter(function(part) {return part;});
33
+ pathParts.pop(); // remove the last part of the path
34
+ const newPath = '/' + pathParts.join('/');
35
+ window.location.href = `${url.origin}${newPath}`+ (current.target || '#/');
36
} else {
37
window.location.replace('?' + mode);
38
}
0 commit comments