itch icon indicating copy to clipboard operation
itch copied to clipboard

URL routing doesn't canonicalize //, rendering 404 for new tab buttons in client

Open nc7s opened this issue 1 year ago • 1 comments

image

That's actually two problems:

  • Your backend routing doesn't canonicalize //, so //games isn't canonicalized to and recognized as /games, which should be.
  • The base URL constant has a slash, while added components have one too.
    • https://github.com/itchio/itch/blob/102011c51dc26a3142795c67394c365bb09cb309/src/common/constants/urls.ts#L1-L2
    • https://github.com/itchio/itch/blob/102011c51dc26a3142795c67394c365bb09cb309/src/renderer/pages/BrowserPage/newTabItems.ts#L33-L35

nc7s avatar Dec 16 '23 13:12 nc7s

This seems like a valid improvement. Perhaps a good first issue.

3ter avatar Jan 23 '24 13:01 3ter