fastify-static
Advanced tools
Comparing version 4.0.0 to 4.0.1
@@ -44,3 +44,3 @@ // Definitions by: Jannik <https://github.com/jannikkeye> | ||
immutable?: boolean; | ||
index?: string[]; | ||
index?: string[] | false; | ||
lastModified?: boolean; | ||
@@ -70,3 +70,3 @@ maxAge?: string | number; | ||
immutable?: boolean; | ||
index?: string[]; | ||
index?: string[] | false; | ||
lastModified?: boolean; | ||
@@ -73,0 +73,0 @@ maxAge?: string | number; |
{ | ||
"name": "fastify-static", | ||
"version": "4.0.0", | ||
"version": "4.0.1", | ||
"description": "Plugin for serving static files as fast as possible.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -85,2 +85,13 @@ import fastify from 'fastify' | ||
}) | ||
const noIndexApp = fastify() | ||
options.root = '' | ||
options.index = false | ||
noIndexApp | ||
.register(fastifyStatic, options) | ||
.after(() => { | ||
noIndexApp.get('/', (request, reply) => { | ||
reply.send('<h1>fastify-static</h1>') | ||
}) | ||
}) |
217217
3191