22003: prevent redirect loop in Wb2 client-side redirect handler 22003-keep-web-and-wb2-redirect-parameter
authorZoë Ma <zoe.ma@curii.com>
Mon, 22 Jul 2024 13:10:43 +0000 (21:10 +0800)
committerZoë Ma <zoe.ma@curii.com>
Thu, 25 Jul 2024 02:57:00 +0000 (10:57 +0800)
commit6a43634fb69e7de93bbba1bb617410d18bb9345e
tree3f8541324e320f7fd0609052cb4d661b99d6f7d2
parentcb22c03c206e064f28408689f11247992f8ae44c
22003: prevent redirect loop in Wb2 client-side redirect handler

Check that the target URL is not empty before setting
window.location.href (browsing to new URL), because setting it to empty
effectively reloads the page and triggers the redirect handler again,
causing an endless loop.

Arvados-DCO-1.1-Signed-off-by: Zoë Ma <zoe.ma@curii.com>
services/workbench2/src/common/redirect-to.ts