Skip to content

Commit 0affe08

Browse files
committed
Reverting some previous changes
I need to understand some of the methods in resourceMapper better...
1 parent e857626 commit 0affe08

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/handlers/get.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,15 +134,15 @@ async function globHandler (req, res, next) {
134134
const ldp = req.app.locals.ldp
135135
// TODO: This is a hack, that does not check if the target file exists, as this is quite complex with globbing.
136136
// TODO: Proper support for this is not implemented, as globbing support might be removed in the future.
137-
const requestUri = await ldp.resourceMapper.resolveUrl(req.hostname, req.path)
137+
const filename = ldp.resourceMapper.getFullPath(req)
138+
const requestUri = (await ldp.resourceMapper.mapFileToUrl({ path: filename, hostname: req.hostname })).url
138139

139140
const globOptions = {
140141
noext: true,
141142
nobrace: true,
142143
nodir: true
143144
}
144145

145-
const filename = ldp.resourceMapper.getFullPath(req)
146146
glob(filename, globOptions, function (err, matches) {
147147
if (err || matches.length === 0) {
148148
debugGlob('No files matching the pattern')

0 commit comments

Comments
 (0)