Skip to content

Commit 6941cf0

Browse files
committed
Remove deprecated utils#getBaseUri
1 parent 88c1faf commit 6941cf0

File tree

1 file changed

+0
-11
lines changed

1 file changed

+0
-11
lines changed

lib/utils.js

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
module.exports.getBaseUri = getBaseUri
21
module.exports.pathBasename = pathBasename
32
module.exports.hasSuffix = hasSuffix
43
module.exports.serialize = serialize
@@ -69,16 +68,6 @@ function debrack (s) {
6968
return s.substring(1, s.length - 1)
7069
}
7170

72-
function getBaseUri (req) {
73-
// Obtain the protocol from the configured server URI
74-
// (in case the server is running behind a reverse proxy)
75-
const locals = req.app.locals
76-
const serverUri = locals.host.serverUri
77-
const protocol = serverUri.replace(/:.*/, '')
78-
79-
return `${protocol || req.protocol}://${req.get('host')}`
80-
}
81-
8271
function pathBasename (fullpath) {
8372
let bname = ''
8473
if (fullpath) {

0 commit comments

Comments
 (0)