-
Notifications
You must be signed in to change notification settings - Fork 10.3k
feat(redirects): handle absolute from paths when path prefix is used #12509
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(redirects): handle absolute from paths when path prefix is used #12509
Conversation
pieh
left a comment
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.
This is looking very nice! I really love comprehensive test suite for this! I have one suggestion just to keep code a little more DRY
Remove duplicated logic and make it as maybeAddPathPrefix.
|
@pieh Thanks for the thoughtful review. I updated the code based on your recommendation. Please review the changes when you have time. 😊 |
pieh
left a comment
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.
Awesome! thanks @edykim!
Description
toPathincreateRedirecthandles path prefix properly, however,fromPathdoesn't. I added the code for supporting thefromPathcases.Also, I added test cases of
createRedirectaction for the future.Related Issues
Fixes #12497