We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 88c1faf commit 6941cf0Copy full SHA for 6941cf0
lib/utils.js
@@ -1,4 +1,3 @@
1
-module.exports.getBaseUri = getBaseUri
2
module.exports.pathBasename = pathBasename
3
module.exports.hasSuffix = hasSuffix
4
module.exports.serialize = serialize
@@ -69,16 +68,6 @@ function debrack (s) {
69
68
return s.substring(1, s.length - 1)
70
}
71
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
82
function pathBasename (fullpath) {
83
let bname = ''
84
if (fullpath) {
0 commit comments