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

Image Handler cached on NextJS despite including specified headers #533

Open
1 task done
nickreynolds opened this issue Dec 9, 2024 · 0 comments
Open
1 task done

Comments

@nickreynolds
Copy link

Describe the bug

I am using Frog in a NextJS application along with an Image Handler to render a layout-intensive frame.

I've followed the instructions on this page: https://frog.fm/concepts/image-handler starting from the provided NextJS template from this repo.

However, caching is persisting even with the provided headers on the image response:

return c.res({
    image: (      
        ...
    ),
    headers: {
      "cache-control": "max-age=0",
    }
})

The only way I can reliably test changes is to change the name of the image endpoint, which is obviously not an ideal DevEx.

Link to Minimal Reproducible Example

https://github.com/nickreynolds/frog-next-caching

Steps To Reproduce

From the provided minimal repro example, run:

npm install
npm run dev

Then try changing any of the data. Notice that the rendered image does not update on a refersh to reflect your changes.

Frog Version

0.18.2

TypeScript Version

5.7.2

Check existing issues

Anything else?

No response

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

No branches or pull requests

1 participant