next.js
41e401d5 - Fix relative redirect (#71932)

Commit
1 year ago
Fix relative redirect (#71932) # Fixing a bug ## What? Changed the formation of the redirect url to the correct way. _It’s interesting that you had tests for this, but since only the main page was tested, it wasn’t caught._ Expanded the tests, made a separate method to assign location, and described it. ```js new URL('./relative', 'https://example.com/subdir').href // 'https://example.com/relative' new URL('./relative', 'https://example.com/subdir/').href // 'https://example.com/subdir/relative' ``` Fixes #71906 [#65893, #67966] --------- Co-authored-by: Zack Tanner <1939140+ztanner@users.noreply.github.com>
Author
Parents
Loading