nestjs / serve-static

Serve static websites (SPA's) using Nest framework (node.js) 🥦

Home Page:https://nestjs.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Some properties in `serveStaticOptions` are not passed properly when Fastify is used

geekdada opened this issue · comments

I'm submitting a...


[ ] Regression 
[x] Bug report
[ ] Feature request
[ ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead post your question on Stack Overflow.

Current behavior

All the options other than setHeaders and redirect will not be effective if you are using Fastify as the adapter. The bug happens here https://github.com/nestjs/serve-static/blob/master/lib/loaders/fastify.loader.ts#L29 , fastify-static doesn't have an option called send (https://github.com/fastify/fastify-static/blob/master/index.js#L23).

Expected behavior

Minimal reproduction of the problem with instructions

What is the motivation / use case for changing the behavior?

Environment


Nest version: 7.0.8


Others:

Just out of curiosity, am I the only one using this library with Fastify? 🤔

Fixed in 2.1.1