@fastify/static
Advanced tools
Comparing version 7.0.2 to 7.0.3
@@ -114,4 +114,9 @@ 'use strict' | ||
if (opts.wildcard === undefined || opts.wildcard === true) { | ||
fastify.get(prefix + '*', { ...routeOpts, exposeHeadRoute: true }, (req, reply) => { | ||
pumpSendToReply(req, reply, '/' + req.params['*'], sendOptions.root) | ||
fastify.route({ | ||
...routeOpts, | ||
method: ['HEAD', 'GET'], | ||
path: prefix + '*', | ||
handler (req, reply) { | ||
pumpSendToReply(req, reply, '/' + req.params['*'], sendOptions.root) | ||
} | ||
}) | ||
@@ -118,0 +123,0 @@ if (opts.redirect === true && prefix !== opts.prefix) { |
{ | ||
"name": "@fastify/static", | ||
"version": "7.0.2", | ||
"version": "7.0.3", | ||
"description": "Plugin for serving static files as fast as possible.", | ||
@@ -58,3 +58,3 @@ "main": "index.js", | ||
"tap": "^16.0.0", | ||
"tsd": "^0.30.0", | ||
"tsd": "^0.31.0", | ||
"typescript": "^5.1.6" | ||
@@ -61,0 +61,0 @@ }, |
Sorry, the diff of this file is too big to display
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
415206
5438
1