forked from nextstrain/nextstrain.org
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
charon: Redirect to the fully-resolved prefix more robustly
Compare (canonicalized) prefixes, not URLs, because that's more precisely what we're concerned about here. Construct the relative URL for redirection using proper URL handling. The previous method for constructing the new URL was problematic for several reasons, including that whether other query params were passed along or not with the baseUrl depended on where they were relative to the prefix param. Also, while unlikely in this case, if a prefix value appeared elsewhere in the URL earlier than the query param, it all broke because of the split().
- Loading branch information
Showing
3 changed files
with
20 additions
and
10 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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