-
Notifications
You must be signed in to change notification settings - Fork 27.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(middleware): consider localhost variations (#31603)
Since `localhost` is actually an alias for `127.0.0.1` that points to loopback, we should take that into consideration at `NextURL` when we handle local URLs. The implementation is based on [is-localhost-url](https://github.com/Kikobeats/is-localhost-url); I added some tests over local URLs variations present at the library to ensure other variations are working fine. Additionally, I refactor some things over the code to avoid doing the same twice and added some legibility that is always welcome when you are working with URLs stuff. closes #31533
- Loading branch information
Showing
2 changed files
with
27 additions
and
6 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
f52211b
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.
Stats from current release
Default Build (Increase detected⚠️ )
General Overall increase⚠️
Page Load Tests Overall decrease⚠️
Client Bundles (main, webpack, commons) Overall increase⚠️
Legacy Client Bundles (polyfills)
Client Pages Overall increase⚠️
Client Build Manifests
Rendered Page Sizes Overall increase⚠️
Diffs
Diff for _buildManifest.js
Diff for image-HASH.js
Diff for link-HASH.js
Diff for main-HASH.js
Diff for index.html
Diff for link.html
Diff for withRouter.html
Default Build with SWC (Increase detected⚠️ )
General Overall increase⚠️
Page Load Tests Overall decrease⚠️
Client Bundles (main, webpack, commons) Overall increase⚠️
Legacy Client Bundles (polyfills)
Client Pages Overall increase⚠️
Client Build Manifests Overall decrease ✓
Rendered Page Sizes Overall increase⚠️
Diffs
Diff for _buildManifest.js
Diff for image-HASH.js
Diff for link-HASH.js
Diff for main-HASH.js
Diff for index.html
Diff for link.html
Diff for withRouter.html