Conversation
Fixes before v1.0.0-a release
Prevent false subdomain detection on openscan.eth.link and openscan.eth.limo which was causing unwanted redirects to the base domain (eth.link/eth.limo).
Switch from conditional BrowserRouter/HashRouter to HashRouter everywhere. This fixes the refresh issue on IPFS gateways where deep URLs would fail to resolve since IPFS cannot handle client-side routing paths.
fix: IPFS/ENS routing compatibility
|
🚀 Preview: https://pr-152--openscan.netlify.app |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This pull request updates the routing strategy to use
HashRouterexclusively, improving compatibility with IPFS and ENS gateways, and refines subdomain handling logic to avoid unnecessary redirects for ENS-based domains. It also updates documentation to clarify the new routing approach.Routing changes for IPFS/ENS compatibility:
HashRouterinstead of conditionally switching betweenBrowserRouterandHashRouter, simplifying the code and ensuring compatibility with decentralized gateways. (src/App.tsx, [1] [2]HashRouteris used for IPFS/ENS compatibility. (README.md, README.mdL249-R249)Subdomain handling improvements:
.eth.link,.eth.limo), preventing unnecessary redirects and ensuring correct behavior when accessed via ENS. (src/utils/subdomainUtils.ts, src/utils/subdomainUtils.tsR21-R25)Code cleanup:
HashRouter. (src/App.tsx, [1] [2]