Prevent redirect to /action/login after login
Docker Image CI / build-and-push-image (push) Has been cancelled
Maintain Release Merge PR / update-release-pr (push) Has been cancelled
Notify HeyPuter / notify (push) Has been cancelled
release-please / release-please (push) Has been cancelled
test / test-backend (24.x) (push) Has been cancelled
test / API tests (node env, api-test) (24.x) (push) Has been cancelled
test / puterjs (node env, vitest) (24.x) (push) Has been cancelled

This commit is contained in:
jelveh
2026-04-08 18:47:04 -07:00
parent 9a6c414f9d
commit 481a1a1d90
+8 -1
View File
@@ -39,7 +39,14 @@ async function UIWindowLogin (options) {
if ( options.redirect_url === undefined )
{
options.redirect_url = window.location.href;
if ( window.location?.href?.toLowerCase().endsWith('/action/login') )
{
options.redirect_url = '/';
}
else
{
options.redirect_url = window.location.href;
}
}
return new Promise(async (resolve) => {