10 lines
215 B
JavaScript
10 lines
215 B
JavaScript
|
"use strict";
|
||
|
|
||
|
const url = require('url');
|
||
|
module.exports = function getFullURL(req) {
|
||
|
const root = url.format({
|
||
|
protocol: req.protocol,
|
||
|
host: req.get('host')
|
||
|
});
|
||
|
return `${root}${req.originalUrl}`;
|
||
|
};
|