src: fix /download/docs/latest-* links - #1006
Open
flakey5 wants to merge 1 commit into
Open
Conversation
Signed-off-by: flakey5 <73616808+flakey5@users.noreply.github.com>
Member
|
@flakey5 should this be a rewrite on Cloudflare-level instead of a hacky mapping in here? |
ovflowd
reviewed
Aug 18, 2026
| @@ -152,7 +152,15 @@ function getR2Path({ | |||
| if (pathname.startsWith('/dist')) { | |||
| return `nodejs/release/${filePath}`; | |||
| } else if (pathname.startsWith('/download')) { | |||
Member
There was a problem hiding this comment.
IMO none of this (line 152-180) belongs here, this should be part of our custom mapings (ie a Map() or something that contains rewrites/mappings) instead of hardcoded if/else statements. These become larger and larger and harder to maintain, and in general if-statements shouldn't be this deep or convoluted 😅
Member
Author
This makes requests to |
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.
Kinda messy but works, we should probably find a nicer/easier way to do
getR2PaththoughFixes #1005