@fastify/static 6.11.1 → 6.11.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +4 -2
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -396,7 +396,9 @@ async function fastifyStatic (fastify, opts) {
|
|
|
396
396
|
}
|
|
397
397
|
|
|
398
398
|
function serveFileHandler (req, reply) {
|
|
399
|
-
|
|
399
|
+
// TODO: remove the fallback branch when bump major
|
|
400
|
+
/* istanbul ignore next */
|
|
401
|
+
const routeConfig = req.routeOptions?.config || req.routeConfig
|
|
400
402
|
pumpSendToReply(req, reply, routeConfig.file, routeConfig.rootPath)
|
|
401
403
|
}
|
|
402
404
|
}
|
|
@@ -552,7 +554,7 @@ function getRedirectUrl (url) {
|
|
|
552
554
|
}
|
|
553
555
|
|
|
554
556
|
module.exports = fp(fastifyStatic, {
|
|
555
|
-
fastify: '
|
|
557
|
+
fastify: '4.x',
|
|
556
558
|
name: '@fastify/static'
|
|
557
559
|
})
|
|
558
560
|
module.exports.default = fastifyStatic
|