Chore: Improve short url redirection (#111162)

Improve short url redirection
This commit is contained in:
Misi authored and GitHub committed 2025-09-16 14:48:17 +02:00
1 parent f3d9bb3219
commit 81fe57478f
1 file changed
+2 -4
+2 -4
View File
@@ -475,10 +475,8 @@ function handleRedirectTo(): void {
let decodedRedirectTo = decodeURIComponent(redirectTo);
if (decodedRedirectTo.startsWith('/goto/')) {
// In this case there should be a request to the backend
if (config.appSubUrl && !decodedRedirectTo.startsWith(config.appSubUrl)) {
decodedRedirectTo = config.appSubUrl + decodedRedirectTo;
}
window.location.replace(decodedRedirectTo);
const urlToRedirectTo = locationUtil.assureBaseUrl(decodedRedirectTo);
window.location.replace(urlToRedirectTo);
return;
}
// Ensure that the appsuburl is stripped from the redirect to in case of a frontend redirect