-
-
Notifications
You must be signed in to change notification settings - Fork 10.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: absolute redirect fails while using base url #10052
Comments
This should be fixed by #10033, which is available via 6.8.1-pre.0 |
hi @timdorr This doesn't seem to resolve the issue (v6.8.1). I have created a minimal repo to reproduce this. https://github.com/amsal/rr-basename-redirect.git Assuming port
Thanks |
This is arguably arguably part of #9859 but with the if (isBrowser && typeof window?.location !== "undefined") {
let newOrigin = init.history.createURL(redirect.location).origin;
// ⚠️ This should probably include "OR pathname doesn't start with the basename"
if (window.location.origin !== newOrigin) {
if (replace) {
window.location.replace(redirect.location);
} else {
window.location.assign(redirect.location);
}
return;
}
} |
Any update on this one? |
🤖 Hello there, We just published version Thanks! |
Seems the issue is not fixed, |
This issue is for |
That will be great 😎 |
🤖 Hello there, We just published version Thanks! |
Tested pre.3 looking good, everything works as expected. thank you! |
🤖 Hello there, We just published version Thanks! |
What version of React Router are you using?
6.8.0
Steps to Reproduce
https://example.com/app1
https://example.com
andhttps://example.com/app1
are two independent applications. Served using a reverse proxyapp1
is the base path and it is set usingbasename
https://example.com/app1/logout
Expected Behavior
LogoutLoader should redirect user to
https://example.com
as if it was an external redirect to somewhere likehttps://google.com
. It should be a redirect via browser instead of react-router.Actual Behavior
React router changes the browser URL but the content of the site is still from
https://example.com/app1
instead ofhttps://example.com
. In the browser dev tools, no request is made to redirect URL.Possible bug might be here
react-router/packages/router/router.ts
Line 3130 in 6120207
The text was updated successfully, but these errors were encountered: