Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(plugin): we're handling cache-control #451

Merged
merged 3 commits into from
Oct 29, 2024

Conversation

bhouston
Copy link
Contributor

It turns out that if you set "cacheControl: true" in the options to @fastify/static, it overrides the headers you set in the setHeaders callback. This bug was introduced to remix-fastify in April 2024 in this commit:

a7fcb6d

I identified the issue as I thought it was a bug with @fastify/static, which was discussed here: fastify/fastify-static#477, but it was actually a bug with remix-fastify.

I will admit that the @fastify/static options are very unclear and not user friendly.

Copy link

changeset-bot bot commented Oct 28, 2024

🦋 Changeset detected

Latest commit: 11e0fa9

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@mcansh/remix-fastify Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@mcansh mcansh changed the title fix static file handling. fix(plugin: we're handling cache-control Oct 28, 2024
@mcansh mcansh changed the title fix(plugin: we're handling cache-control fix(plugin): we're handling cache-control Oct 29, 2024
Signed-off-by: Logan McAnsh <logan@mcan.sh>
Copy link

pkg-pr-new bot commented Oct 29, 2024

Open in Stackblitz

More templates

pnpm add https://pkg.pr.new/@mcansh/remix-fastify@451

commit: 11e0fa9

@mcansh mcansh merged commit 54fff80 into mcansh:main Oct 29, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants