Skip to content

Commit 2f7fbb3

Browse files
committed
Fix databrowser being used instead of index.html files
1 parent d776c20 commit 2f7fbb3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/handlers/get.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,8 @@ async function handler (req, res, next) {
8282

8383
// Handle dataBrowser
8484
if (requestedType && requestedType.includes('text/html')) {
85-
let mimeTypeByExt = mime.lookup(_path.basename(path))
85+
const { path: filename } = await ldp.resourceMapper.mapUrlToFile({ url: options })
86+
let mimeTypeByExt = mime.lookup(_path.basename(filename))
8687
let isHtmlResource = mimeTypeByExt && mimeTypeByExt.includes('html')
8788
let useDataBrowser = ldp.dataBrowserPath && (
8889
container ||

0 commit comments

Comments
 (0)