walletbeat icon indicating copy to clipboard operation
walletbeat copied to clipboard

Implement IPFS-compatible redirects

Open polymutex opened this issue 6 months ago • 0 comments

Currently, the wallet pages are /[walletName]. This is short and easy to share on social media. However, it does break the logical hierarchy of the site, with /[walletType] as first element. @lucemans has proposed moving to something like this, as L2BEAT does, but doing so would require creating awkward JS-based redirect pages at /[walletName] for redirects. This breaks social media sharing too, since OpenGraph data would likely be absent from such pages.

Turns out IPFS supports this via a special file called _redirects, documented here. It should be possible, as part of the build process, to generate a file called _redirects in the dist directory which contains the mapping from /[walletName] to the deeper version of the URL. IPFS gateways read this file and send proper HTTP-protocol-level redirects upon the presence of this file.

Credits to @oed for pointing out this feature.

polymutex avatar Jun 04 '25 04:06 polymutex