next.js
2da6da66 - Create the base URL of parseRelativeUrl once on the server

Commit
24 days ago
Create the base URL of parseRelativeUrl once on the server parseRelativeUrl constructed `new URL('http://n')` on every call to read its protocol, host and origin. On the server that base never changes and is only read, so one instance serves every call. A request to `next start` parses its URL four times this way. In the browser the base is the location's origin and is still read for each call.
Author
Committer
Parents
Loading