mcansh / remix-fastify

Fastify server request handler for Remix
https://remix-fastify.onrender.com
MIT License
194 stars 29 forks source link

support for fastify v5 #429

Closed mcansh closed 3 weeks ago

ryanxcharles commented 3 weeks ago

Great job. Just want to say thanks for putting this out. I just upgraded your plugin and fastify. I love seeing all my dependencies upgraded, and everything just works! Thank you!

mcansh commented 3 weeks ago

thank you for the comment @ryanxcharles ❤️ - i finally had some time to get it over the line

bhouston commented 2 weeks ago

FYI I think that upgrading to Fastify 5.x broke cache-control headers. I am new to Fastify but I think I traced the cause back to the @fastify/static plugin no longer working as expected with Fastify 5.x. I filed a bug with a reproduction here: https://github.com/fastify/fastify-static/issues/477

bhouston commented 2 weeks ago

Hmm... no it is a bug in fastify-remix introduced here:

https://github.com/mcansh/remix-fastify/commit/a7fcb6da513ce17ac106f0930373f3edd9d976c9

Basically when using @fastify/static, the cacheControl: true option overrides anything you set in the setHeaders callback. Thus since this change in April, static caching has been broken in remix-fastify.

mcansh commented 2 weeks ago

thank you for the detective work @bhouston, i did local tests when implementing and it all seemed fine originally. i definitely need to spend some time and integrate some e2e tests