From 6c201f9305706166b03182ec7c7d8b6e3ac1c5b7 Mon Sep 17 00:00:00 2001 From: Roman Timashev Date: Sun, 13 Oct 2019 19:57:25 +0300 Subject: [PATCH] next-lib refactoring --- src/next-lib.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/next-lib.js b/src/next-lib.js index 40d54426..3694918b 100644 --- a/src/next-lib.js +++ b/src/next-lib.js @@ -42,10 +42,11 @@ function absoluteUrl(req, defaultLocalhost) { if (defaultLocalhost) host = defaultLocalhost protocol = 'http:' } + const origin = protocol + '//' + host return { - protocol: protocol, - host: host, - origin: protocol + '//' + host + protocol, + host, + origin, } }