-
Notifications
You must be signed in to change notification settings - Fork 27k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rename url to path for onRequestError request arg (#68672)
### What * Rename the `request.url` in onRequestError callback arg to `request.path` * Align `routeType: "middleware"` with others, only contain the resource path in the `request.path`, stripped out request origin. ### Why For non middleware case, the `req.url` in next-server is actual resource path, which only contains the pathname and search but without request origin. For middleware case, the origin is included in the `req.url`. This might be a implementation detail, but for users, having request origin here might not be critical and super helpful since they will know the deployment as a global context for error tracking. Hence we align the property to a variable that not holding request origin, given a better naming `request.path`. The idea is from `:path` request header, which represents the resource path, only containing pathname and search. e.g. `/a/b?c=2` x-ref: https://greenbytes.de/tech/webdav/draft-ietf-httpbis-http2-09.html#HttpRequest Closes NDX-54
- Loading branch information
Showing
7 changed files
with
13 additions
and
20 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
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
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