-
Notifications
You must be signed in to change notification settings - Fork 176
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow router.redirect() to accept external destinations (#110)
* Allow router.redirect() to accept external destinations * Remove redundant case-insensitive flag * Added tests for router.redirect() with external destinations * Simplify external destination detection
- Loading branch information
Showing
2 changed files
with
31 additions
and
1 deletion.
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
89b7c02
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would probably be better to use
url
internal Node module to parse the destination (instead of.includes
approach you did; which is fine for now). So if you want to improve it you could submit another PR with that (e.g. use thedestination
value and if it's valid then return thehref
, see https://nodejs.org/api/url.html#url_url_href).89b7c02
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No worries though, thanks for this, releasing new major semver bump now