-
Notifications
You must be signed in to change notification settings - Fork 1k
Add _headers file to NextJS workers template #9442
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
Conversation
🦋 Changeset detectedLatest commit: 1e4d64c The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me 🤙
A Wrangler prerelease is available for testing. You can install this latest build in your project with: npm install --save-dev https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/15417642931/npm-package-wrangler-9442 Prereleases for other packages:
wget https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/15417642931/npm-package-cloudflare-workers-bindings-extension-9442 -O ./cloudflare-workers-bindings-extension.0.0.0-vf2b3569f9.vsix && code --install-extension ./cloudflare-workers-bindings-extension.0.0.0-vf2b3569f9.vsix
npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/15417642931/npm-package-create-cloudflare-9442 --no-auto-update
npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/15417642931/npm-package-cloudflare-kv-asset-handler-9442
npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/15417642931/npm-package-miniflare-9442
npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/15417642931/npm-package-cloudflare-pages-shared-9442
npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/15417642931/npm-package-cloudflare-unenv-preset-9442
npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/15417642931/npm-package-cloudflare-vite-plugin-9442
npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/15417642931/npm-package-cloudflare-vitest-pool-workers-9442
npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/15417642931/npm-package-cloudflare-workers-editor-shared-9442
npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/15417642931/npm-package-cloudflare-workers-shared-9442
npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/15417642931/npm-package-cloudflare-workflows-shared-9442 Note that these links will no longer work once the GitHub Actions artifact expires. |
Thanks Dario! |
Co-authored-by: Benjamín Vicente <[email protected]>
Adds the
_headers
file to the NextJS workers template. This will allow browser caching on static and immutable files that NextJS generates, since Cloudflare Static Assets have the headerCache-Control: public, max-age=0, must-revalidate
by default.A related issue has opened on the OpenNext repository: opennextjs/opennextjs-cloudflare#624 .
Supersedes #9131 + #9264