Skip to content

Commit 00aa705

Browse files
committed
Use ResourceMapper in root handler
1 parent c5c2e6e commit 00aa705

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

lib/handlers/index.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,14 @@ module.exports = handler
22

33
const path = require('path')
44
const debug = require('debug')('solid:index')
5-
const utils = require('../utils')
65
const Negotiator = require('negotiator')
76

87
async function handler (req, res, next) {
98
const indexFile = 'index.html'
109
const ldp = req.app.locals.ldp
1110
const negotiator = new Negotiator(req)
1211
const requestedType = negotiator.mediaType()
13-
const filename = utils.reqToPath(req)
12+
const { path: filename } = await req.app.locals.ldp.resourceMapper.mapUrlToFile({ url: req })
1413

1514
try {
1615
const stats = await ldp.stat(filename)

0 commit comments

Comments
 (0)