Skip to content

Commit

Permalink
Merge pull request #18974 from laperlej/fix_cilogon
Browse files Browse the repository at this point in the history
[24.1] fix CILogon redirect
  • Loading branch information
dannon authored Oct 16, 2024
2 parents ceef7ca + a776e80 commit 5f11830
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions client/src/utils/redirect.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ test("route prefix changes", async () => {
expect(withPrefix("http://")).toEqual("http://");
expect(withPrefix("/")).toEqual("/prefix/");
expect(withPrefix("/home")).toEqual("/prefix/home");
// keep protocols in query parameters intact
expect(withPrefix("/authz/cilogon/login?idphint=https://test.com")).toEqual(
"/prefix/authz/cilogon/login?idphint=https://test.com"
);
// ensure that it can only be called once
expect(withPrefix(withPrefix("/home"))).toEqual("/prefix/prefix/home");
// This doesn't do what it looks like it should do?
Expand Down
2 changes: 1 addition & 1 deletion client/src/utils/redirect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export function reloadPage() {
window.location.reload();
}

const slashCleanup = /(\/)+/g;
const slashCleanup = /(?<!:)(\/)+/g;
/**
* Prepends the configured app root to given url
* @param path
Expand Down

0 comments on commit 5f11830

Please sign in to comment.