-
-
Notifications
You must be signed in to change notification settings - Fork 110
Closed
Labels
good first issueGood for newcomersGood for newcomerssemver-minorIssue or PR that should land as semver minorIssue or PR that should land as semver minor
Description
🚀 Feature Proposal
fastify-static could be enhanced by supplying
fastify.head
routes additionally to existing .get.
Motivation
HTTP HEAD request is a simple way to receive information about length of file, date of modification and etag. see https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/HEAD
As it currently stands, every HTTP HEAD request (curl -I) gives 404 error.
The rather new fastify option exposeHeadRoutes does never return when used with fastify-static.
Example
For files it could be tested whether they need to be downloaded because of updates. Also it might be checked whether there is enough space in local cache.
Metadata
Metadata
Assignees
Labels
good first issueGood for newcomersGood for newcomerssemver-minorIssue or PR that should land as semver minorIssue or PR that should land as semver minor