Skip to content

GitHub Issue #1023: Add redirect() helper that uses core-safeRedirect #2021

Open
cnathe wants to merge 7 commits into
developfrom
fb_redirectGH1023
Open

GitHub Issue #1023: Add redirect() helper that uses core-safeRedirect #2021
cnathe wants to merge 7 commits into
developfrom
fb_redirectGH1023

Conversation

@cnathe

@cnathe cnathe commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Rationale

https://github.com/LabKey/internal-issues/issues/1023

In the related PR, we added usages of the core-safeRedirect action. This PR moves that into a redirect() helper that can be used instead of setting window.location.href.

Related Pull Requests

Changes

  • Add redirect() helper that uses core-safeRedirect

@cnathe cnathe requested a review from labkey-alan June 23, 2026 17:23
}

window.location.href = url.toString();
redirect(url.toString());

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@labkey-alan let me know what you think of this change. This would force the usages of navigate() to be internal redirect/navigations only...but I assume that was the intent and all usages are internal URLs. If there is a need for an external redirect / navigate, it was likely using window.location.href directly, right?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant