Closed dlcoffee closed 4 years ago
@dlcoffee : I have never handled cache in nextjs itself. For cases with nextjs export i.e. static build, I put all the resources (html, css, js) in nginx web server. Cache, HTTP headers are handled in nginx itself.
For cases with custom server i.e. nextjs in combination with express, Cache is still handled at Nginx. HTTP headers are passed onto express for further parsing and processing as required.
I hope that answers your query.
hi, thanks for creating this package!
i was wondering if it the fonts are supposed to be cached, and if it was possible to set the headers manually?
i checked out the https://github.com/rohanray/next-fonts-example repo, and didn't see any caching headers set on the font.
curl http://localhost:3000/fonts/Montserrat-ExtraLight.ttf -I
is caching handled by next or this application?
as a workaround (since i'm running nextjs behind a custom express server), i'm basically doing this:
to set the cache control headers manually. however, this doesn't help me if i ever decide to break away from express and go serverless.