We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 132c9ee commit 23f7f54Copy full SHA for 23f7f54
lib/request.js
@@ -287,11 +287,9 @@ module.exports = {
287
get URL() {
288
/* istanbul ignore else */
289
if (!this.memoizedURL) {
290
- const protocol = this.protocol;
291
- const host = this.host;
292
const originalUrl = this.originalUrl || ''; // avoid undefined in template string
293
try {
294
- this.memoizedURL = new URL(`${protocol}://${host}${originalUrl}`);
+ this.memoizedURL = new URL(`${this.origin}${originalUrl}`);
295
} catch (err) {
296
this.memoizedURL = Object.create(null);
297
}
0 commit comments