We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 01f74aa commit 57aa158Copy full SHA for 57aa158
lib/fastify-static.ts
@@ -8,10 +8,11 @@ import { Config } from "./types"
8
// https://github.com/fastify/fastify-static#fastify-static
9
//
10
export function registerServeStatic(server: FastifyInstance, config: Config) {
11
- server.setNotFoundHandler((req, res) => {
+ server.setNotFoundHandler(async (req, res) => {
12
res.sendFile("index.html", config.staticDir)
13
})
14
server.register(fastifyStatic, {
15
root: path.resolve(config.staticDir),
16
+ extensions: ["html", "htm"],
17
18
}
0 commit comments