fix(admin): reload pages when an auth proxy blocks navigation (#3480)

This commit is contained in:
Hampus authored and GitHub committed 2026-10-14 21:18:48 +02:00
1 parent a4802c6004
commit a39410623e
1 file changed
+6
@@ -571,6 +571,12 @@ pub const HTMX_FLASH_SCRIPT: &str = r#"
showToast(failed ? 'error' : 'success', isLoginResponse(xhr) ? 'Session expired. Sign in again.' : failed ? 'Action failed.' : 'Done.');
markToastHandled(event.detail);
}, true);
document.addEventListener('htmx:sendError', function (event) {
if (requestVerb(event.detail) !== 'get') return;
var path = event.detail.pathInfo && event.detail.pathInfo.finalRequestPath;
if (path) window.location.assign(path);
}, true);
})();
"#;