in src/middleware/files.js [48:71]
redirect: normalizeRedirectPath(redirPath + search)
});
}
}
return res.superstatic.handleFileStream({ file: pathname }, result);
}
// Now, let's consider the trailing slash.
const hasTrailingSlash = pathutils.hasTrailingSlash(pathname);
// We want to check for some other files, namely an `index.html` if this were a directory.
const pathAsDirectoryWithIndex = pathutils.asDirectoryIndex(
pathutils.addTrailingSlash(pathname)
);
return providerResult(req, res, pathAsDirectoryWithIndex).then(
(pathAsDirectoryWithIndexResult) => {
// If an exact file wins now, we know that this path leads us to a directory.
if (pathAsDirectoryWithIndexResult) {
if (
trailingSlashBehavior === undefined &&
!hasTrailingSlash &&
!cleanUrlRules
) {
return res.superstatic.handle({