NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
npm · #1819 most downloaded on npm
Routes requests to KV assets
Last release 5 months ago
30 Apr 2026
Release timing varies
gaps range from 3 weeks to 13 months
Nearly every release is documented
notes for 25 of 25 stable releases
Nothing withdrawn
no release was ever pulled
7 years old
25 releases · first in 2019
@cloudflare/config now exports individual binding and export schemas, plus validateSingletonBindings, for callers that need to compose the Worker conf
#14994 2194f88 Thanks @emily-shen! - Export binding and export schemas
@cloudflare/config now exports individual binding and export schemas, plus validateSingletonBindings, for callers that need to compose the Worker config schema.
#14630 42df9bb Thanks @penalosa! - Extract the Cloudflare CLI auth layer into a product-agnostic @cloudflare/workers-auth core
The OAuth login/logout/refresh, credential storage, config cache, and account-selection machinery is now shared behind an AuthProduct descriptor, with a thin per-CLI entrypoint on top. @cloudflare/workers-auth/wrangler (createWranglerAuth) preserves wrangler's existing behaviour, and a new @cloudflare/workers-auth/cf (createCfAuth) adds the cf CLI: its own OAuth app registration (client id, callback port, branded consent pages, scoped-token-only auth), a dedicated scope catalog, JSON config files under ~/.config/cloudflare, and an isolated config-cache namespace so cf login/logout never purges wrangler's cache.
As part of the extraction, @cloudflare/workers-utils now exports the shared createConfigCache (with a namespace option), openInBrowser, and the isInteractive / isNonInteractiveOrCI / isCI TTY-and-CI detection helpers (each taking the caller's logger as a parameter rather than relying on a singleton). These read a bundled ci-info, so consumers that need to fake CI in their tests should mock this package's helpers rather than ci-info directly.
42df9bb]:
One column per quarter.
#14689 2cd84d4 Thanks @emily-shen! - Publish @cloudflare/config package
@cloudflare/config is now published as a standalone package. Previously, its exports (InputWorkerSchema, OutputWorkerSchema, convertToWranglerConfig, and related types) were re-exported through @cloudflare/deploy-helpers. Consumers should import directly from @cloudflare/config instead.
@cloudflare/deploy-helpers no longer re-exports @cloudflare/config symbols.
#14681 8e29318 Thanks @emily-shen! - Move preview command logic from wrangler into @cloudflare/deploy-helpers
Preview orchestration, API calls, formatting, and settings management now live in @cloudflare/deploy-helpers.
Updated dependencies [7692a61, ed33326, 018574b, 42df9bb, 7692a61]:
Updated dependencies [`0283a1f`]:
0283a1f]:
#11898 c17e971 Thanks @petebacondarwin! - Bundle more third-party dependencies to reduce supply chain risk
Previously, several small utility packages were listed as runtime dependencies and installed separately. These are now bundled directly into the published packages, reducing the number of external dependencies users need to trust.
Bundled dependencies:
acorn, acorn-walk, exit-hook, glob-to-regexp, stoppablemime@remix-run/node-fetch-server, defu, get-port, picocolors, tinyglobbybirpc, devalue, get-port, semverUpdated dependencies [`aad35b7`, `1ac96a1`, `1ca8d8f`]:
4d61fae Thanks @petebacondarwin! - refactor to generate ESM modules and support Node 22+### Minor Changes - #14905 `b21eac2` Thanks @jamesopstad! - Move build output utils to new @cloudflare/build-output-utils package
b21eac2 Thanks @jamesopstad! - Move build output utils to new @cloudflare/build-output-utils package#14591 0283a1f Thanks @dario-piotrowicz! - Export collectPackageDependencies for npm dependency metadata collection
The package dependency discovery logic (collecting installed npm package names and versions from a project's package.json) is now owned by deploy-helpers and called internally during deploy and version uploads, rather than being pre-computed in wrangler and passed through as a prop.
#14156 e1532eb Thanks @petebacondarwin! - Add opt-in OS keychain storage for OAuth credentials
By default wrangler stores your OAuth tokens in a plaintext file, and that is unchanged. You can now opt in to encrypting them at rest instead: wrangler login --use-keyring writes the tokens to an AES-256-GCM-encrypted file whose key is held in your OS keyring (macOS Keychain, libsecret on Linux, or Windows Credential Manager). Existing plaintext credentials are migrated automatically on first use.
Toggle it with any of:
wrangler login --use-keyring / --no-use-keyringwrangler auth keyring enable / disable (or wrangler auth keyring to print the current setting) — useful if you only use named profiles and never run the global wrangler loginCLOUDFLARE_AUTH_USE_KEYRING=true|false to override the saved preference for a single commandOpting out deletes the encrypted credentials rather than decrypting them back to disk, so you re-authenticate afterwards. The preference applies to every auth profile, and each named profile gets its own encrypted file and key.
Per-platform requirements: macOS uses the built-in security tool (nothing to install); Linux uses secret-tool from libsecret-tools (wrangler prints an install hint if it is missing); Windows lazily installs @napi-rs/keyring (~1.9 MB) on first opt-in, and errors with instructions in non-interactive/CI contexts.
CLOUDFLARE_API_TOKEN and CLOUDFLARE_API_KEY/CLOUDFLARE_EMAIL continue to take priority over any stored OAuth credentials.
aa5d580]:
Followup from https://github.com/cloudflare/workers-sdk/pull/6090, this enables typechecking and linting in kv-asset-handler, and fixes any failures.
#6102 d4e1e9f Thanks @threepointone! - chore: pass lint/typechecks for kv-asset-handler
Followup from https://github.com/cloudflare/workers-sdk/pull/6090, this enables typechecking and linting in kv-asset-handler, and fixes any failures.
### Patch Changes - #14707 `b38f494` Thanks @emily-shen! - Update zod to v4
b38f494 Thanks @emily-shen! - Update zod to v4#6029 f5ad1d3 Thanks @threepointone! - chore: Normalize some dependencies in workers-sdk
This is the first of a few expected patches that normalize dependency versions, This normalizes undici, concurrently, @types/node, react, react-dom, @types/react, @types/react-dom, eslint, typescript. There are no functional code changes (but there are a couple of typecheck fixes).
Updated dependencies [`0852346`]:
0852346]:
1b7739e Thanks @DaniFoldi! - docs: show new Discord url everywhere for consistency. The old URL still works, but https://discord.cloudflare.com is preferred.Updated dependencies [`673b09e`, `5dfb788`]:
#14347 673b09e Thanks @jamesopstad! - Update undici from 7.24.8 to 7.28.0
Updated dependencies [673b09e, 5dfb788]:
This PR removes the tests from the npm package, reducing the size of the package by about half.
These PRs bump dependencies of the project to their latest versions.
This PR fixes the anchor links in the README.
Account-level settings (accountId, complianceRegion) now live in a dedicated, named settings export authored via defineSettings, rather than on the Wo
#14724 a50f73a Thanks @jamesopstad! - Add a settings export to the experimental cloudflare.config.ts config
Account-level settings (accountId, complianceRegion) now live in a dedicated, named settings export authored via defineSettings, rather than on the Worker config. A cloudflare.config.ts can export at most one settings object; the Worker itself is the default export.
// cloudflare.config.ts
import { defineSettings, defineWorker } from "wrangler/experimental-config";
import * as entrypoint from "./src/index.ts" with { type: "cf-worker" };
export const settings = defineSettings({
accountId: "<your-account-id>",
});
export default defineWorker({
name: "my-worker",
entrypoint,
compatibilityDate: "2026-05-18",
});
This is only used behind the experimental new-config path (wrangler --experimental-new-config and the @cloudflare/vite-plugin experimental.newConfig option).
#14474 aa5d580 Thanks @WillTaylorDev! - Add cache options for WorkerEntrypoint exports
You can now set cache options on WorkerEntrypoint exports and configure cross-version cache behavior globally:
// wrangler.json
{
"cache": { "enabled": true, "cross_version_cache": true },
"exports": {
"default": {
"type": "worker",
"cache": { "enabled": false }
},
"Admin": {
"type": "worker",
"cache": { "enabled": true }
}
}
}
Wrangler sends the exports config to the deploy and version upload APIs alongside the global cache.enabled and cache.cross_version_cache settings. The platform resolves those global settings plus cache overrides on exports and validates which entrypoint names are cacheable.
#14305 98793d8 Thanks @jbwcloudflare! - Improve asset upload performance with single-file uploads
Asset uploads now use a more efficient per-file upload path when the platform enables it. This is rolled out server-side and requires no configuration changes. Existing upload behavior is unchanged when the new path is not enabled.
Updated dependencies [aa5d580, 6b0ce98]:
#14042 7e63948 Thanks @edevil! - Add a --temporary flag that creates and uses a temporary Cloudflare preview account when you have no credentials, instead of starting the OAuth login flow.
It's registered only on the commands the short-lived account token can serve — Workers (deploy, versions upload, and related commands), KV, D1, Hyperdrive, Queues, and certificate commands — and is for unauthenticated use only: passing it while already authenticated (OAuth, CLOUDFLARE_API_TOKEN, or a global API key) errors rather than silently ignoring the flag. Before provisioning, Wrangler handles Cloudflare's Terms of Service and Privacy Policy (interactive terminals prompt for yes; non-interactive shells print a notice and continue). Wrangler then runs with the short-lived token and prints a claim URL so the account can be claimed before it expires. The cached account is cleared on successful login or logout.
ecfdd5a]:
This allows users to override the default strong ETag validator behaviour to use weak ETag validators. This change allows the developer to use weak ETags and preserve 304 responses (e.g. on *.workers.dev domains).
Previously when edge cached was enabled, the content-length of the response was not being set correctly. This was due to the length property of the ArrayBuffer instance being called instead of the byteLength property. This PR fixes this issue.
chore(ci): bump node versions in actions - [KianNH], [pull/354]
This bumps the Node versions used in the CI actions to the latest LTS versions.
chore: use tabs for indentation - [Cherry], [pull/355]
This PR changes the indentation of the project to use tabs instead of spaces, falling more in line with other Cloudflare JavaScript projects like wrangler.
chore: bump dependencies - [Cherry], [pull/356]
This bumps many dependencies of the project to their latest versions.
wrangler now detects nub — from its npm_config_user_agent and an installed nub binary — and autoconfig detects nub projects by their nub.lock, alongsi
#14595 2b390d7 Thanks @colinhacks! - Recognise nub as a package manager
wrangler now detects nub — from its npm_config_user_agent and an installed nub binary — and autoconfig detects nub projects by their nub.lock, alongside npm, pnpm, yarn, and bun.
#14534 a330170 Thanks @petebacondarwin! - Preserve existing Nuxt modules when configuring a project for Cloudflare
Configuring an existing Nuxt project whose nuxt.config.ts already declares a modules array previously overwrote that array when adding nitro-cloudflare-dev, dropping modules such as @nuxt/ui. Existing entries are now retained and the Cloudflare module is appended instead.
Updated dependencies [2b390d7, a6c214f]:
#14689 2cd84d4 Thanks @emily-shen! - Publish @cloudflare/config package
@cloudflare/config is now published as a standalone package. Previously, its exports (InputWorkerSchema, OutputWorkerSchema, convertToWranglerConfig, and related types) were re-exported through @cloudflare/deploy-helpers. Consumers should import directly from @cloudflare/config instead.
@cloudflare/deploy-helpers no longer re-exports @cloudflare/config symbols.
#14321 88662aa Thanks @emily-shen! - re-export OutputWorkerSchema from internal config package
#14265 e3fce14 Thanks @emily-shen! - Expose Cloudflare config conversion utilities from deploy helpers
@cloudflare/deploy-helpers now re-exports ConfigSchema and convertToWranglerConfig from the internal @cloudflare/config package, so consumers can parse and convert Cloudflare config files without depending on the unpublished package directly.
#14265 e3fce14 Thanks @emily-shen! - Bundle private internal dependencies in deploy helpers
@cloudflare/deploy-helpers no longer declares private workspace packages as runtime dependencies, so installing the package from npm does not require unpublished internal packages.
#14304 ee82c76 Thanks @emily-shen! - Skip resource provisioning for asset-only deployments
Previously, asset-only deployments would provision resources even when there was no user Worker script. On a subsequent deploy, we would re-attempt provisioning as the previous asset-only upload would/could not be bound to the previously provisioned resource. Provisioning would then error as the resource had already been created, blocking the deploy.
Updated dependencies [0e055d3, 27db82c, 2a6a26b, 9a424ed, ecfdd5a, 41f391f]:
#14185 98c9afe Thanks @penalosa! - Make the OAuth identity and token storage injectable, and add a shared env-credential resolver
createOAuthFlow now takes the consumer's OAuth identity (clientId, consent, redirectUri) and token storage on its context, so other Cloudflare CLIs can reuse the flow under their own OAuth app and store tokens in their own location/format. Also adds a shared env→credential resolver (getAuthFromEnv, getAPIToken, requireApiToken).
#14213 10b5538 Thanks @dario-piotrowicz! - Improve authentication error messages with specific failure reasons
When authentication fails (e.g. during wrangler dev --remote or when using remote bindings), the error message now explains exactly what went wrong -- whether no credentials were found, the token expired, or the environment is non-interactive -- and lists actionable steps to fix it, including a wrangler whoami tip.
Previously, auth failures could produce multiple confusing errors (e.g. "Failed to fetch auth token: 400 Bad Request" followed by "Failed to start the remote proxy session"). Now a single, clear error is shown.
Allow changing pathIsEncoded through options - JackPriceBurns, pull/243
When using mapRequestToAsset, it encodes the URL / key and will never check the KV store for the decoded key.
This adds the ability to set pathIsEncoded to true, which will decode the URL before getting it from the KV.
Support ES Modules. - threepointone, pull/261
This PR provides a possible solution for getting Workers Sites working with ES Module workers. This approach is not as invasive as other approaches, so isn't as risky either.
Usage:
import manifestJSON from "__STATIC_CONTENT_MANIFEST";
const manifest = JSON.parse(manifestJSON);
export default {
fetch(request, env, ctx) {
return await getAssetFromKV(
{
request,
waitUntil(promise) {
return ctx.waitUntil(promise);
},
},
{
ASSET_NAMESPACE: env.ASSET_NAMESPACE,
ASSET_MANIFEST: manifest,
}
);
// ...
},
};
fix: default ASSET_MANIFEST to empty object - Cherry, pull/254
As per discussion in Discord and the repo at [https://github.com/Erisa-bits/getassetfromkv-undefined-error], allowing ASSET_MANIFEST to be optional got lost somewhere along the years and errors when attempted to be used without it. This PR restores this functionality by setting it to an empty object (instead of undefined), which allows fall-through to the standard mapRequestToAsset function.
chore: bump dependencies - This updates a few dependencies and also pins @types/node to 15.x since 16.x has some incompatible types.
feat: generate more modern code - This removes the unnecessary async/await polyfill added by TypeScript
chore: remove debug logs around response.body.cancel support - Cherry, pull/249
Fixes issues/248
vite+ installs @voidzero-dev/vite-plus-core under the vite npm alias, so the resolved node_modules/vite/package.json reports the wrapper's own version
#14548 383e679 Thanks @petebacondarwin! - Fix Vite version detection for vite+ projects during autoconfiguration
vite+ installs @voidzero-dev/vite-plus-core under the vite npm alias, so the resolved node_modules/vite/package.json reports the wrapper's own version (e.g. 0.2.2) rather than the underlying Vite version it bundles. This caused autoconfiguration to fail with an error claiming the Vite version was too old to be configured automatically. Autoconfiguration now detects the correct underlying Vite version for these projects.
Updated dependencies [aad35b7, 1ac96a1, 1ca8d8f]:
Only parse ASSET_MANIFEST once on startup - Cherry, pull/185
This PR improves performance of the getAssetFromKV function by only parsing the asset manifest once on startup, instead of on each request. This can have a significant improvement in response times for larger sites. An example of the performance improvement with an asset manifest of over 50k files:
Before change: 100 iterations: Done. Mean kv response time is 16.61 1000 iterations: Done. Mean kv response time is 17.798 After change: 100 iterations: Done. Mean kv response time is 6.62 1000 iterations: Done. Mean kv response time is 7.296
ESM compatibility: fix crash on missing global environment variables - ttraenkler, pull/188
This PR fixes the library from crashing when global environment variables such as __STATIC_CONTENT and __STATIC_CONTENT_MANIFEST are missing, which is currently the case when using the new ESM module syntax.
Note that whilst this partially resolves the issue discussed in issue/174, it does not provide full ESM compatibility yet. Please see issue/174 for further discussion.
Tweak GitHub Actions Workflow for proper PR testing - Cherry, pull/185
This PR tweaks the GitHub Actions Workflow to test PRs properly, both in terms of linting and the repository tests. It runs prettier to maintain code quality and style, and all unit tests on every PR to ensure no regressions occur.
Add test for mapRequestToAsset asset override - Cherry, pull/186
This PR adds a test for the functionality added in pull/159. This tests that when overriding the mapRequestToAsset function in its entirety, this function is always run.
Dependabot updates
A number of dependabot patch-level updates have been merged:
Updated dependencies [`aa5d580`]:
aa5d580]:
Support for defaultDocument configuration - boemekeld, pull/161
This PR adds support for customizing the defaultDocument option in getAssetFromKV. In situations where a project does not use index.html as the default document for a path, this can now be customized to values like index.shtm:
return getAssetFromKV(event, {
defaultDocument: "index.shtm",
});
Fire mapRequestToAsset for all requests, if explicitly defined - Cherry, pull/159
This PR fixes an issue where a custom mapRequestToAsset handler weren't fired if a matching asset path was found in ASSET_MANIFEST data. By correctly checking for this handler, we can conditionally handle any assets with this handler even if they exist in the ASSET_MANIFEST.
Note that this is a breaking change, as previously, the mapRequestToAsset function was ignored if you set it, and an exact match was found in the ASSET_MANIFEST. That being said, this behavior was a bug, and unexpected behavior, as documented in issue/158.
Etag logic refactor - shagamemnon, pull/133
This PR refactors a great deal of the Etag functionality introduced in 0.0.11. kv-asset-handler will now correctly set strong and weak Etags both to the Cloudflare CDN and to client eyeballs, allowing for higher cache percentages with Workers Sites projects.
Fix path decoding issue - xiaolanglanglang, pull/142
This PR improves support for non-alphanumeric character paths in kv-asset-handler, for instance, if the path requested is in Chinese.
Check HTTP method after mapRequestToAsset - oliverpool, pull/178
This PR fixes an issue where the HTTP method for an asset is checked before the mapRequestToAsset handler is called. This has caused issues for users in the past, where they need to generate a requestKey based on an asset path, even if the request method is not GET. This fixes issue/151.
Add Markdown linting workflow to GitHub Actions - jbampton, pull/135
Our GitHub Actions workflow now includes a linting workflow for Markdown in the project, including the README, this CHANGELOG, and any other .md files in the source code.
Dependabot updates
A number of dependabot patch-level updates have been merged since our last release:
Repository maintenance - Cherry, pull/179
New project maintainer Cherry did a ton of maintenance in this release, improving workflows, code quality, and more. Check out the full list in the PR.
Update README.md - signalnerve, pull/177
This PR adds context to our README, with mentions about what this project is, how to use it, and some new things since the last version of this package: namely, Cloudflare Pages and the new Cloudflare Workers Discord server
Add instructions for updating version in related repos - caass, [pull/171]
This PR adds instructions for updating the kv-asset-handler version in related repositories, such as our templates, that use kv-asset-handler and are exposed to end-users of Wrangler and Workers.
Updated dependencies [`2194f88`]:
2194f88]:
Fixes wrangler#1746
Provides both a programmatic API and a CLI (pages-functions build) for converting a Cloudflare Pages functions/ directory into a Cloudflare Workers bu
#14785 5e6556a Thanks @dario-piotrowicz! - Publish helpers for compiling Pages Functions directories into Workers bundle
Provides both a programmatic API and a CLI (pages-functions build) for converting a Cloudflare Pages functions/ directory into a Cloudflare Workers bundle:
npx @cloudflare/pages-functions build ./functions --outdir ./dist
The package compiles the Worker and its auxiliary modules, but does not deploy them or generate deployment configuration. Consumers must provide the appropriate Wrangler configuration, including the selected fallback service binding (ASSETS by default) when applicable.
#14928 f05a0de Thanks @dario-piotrowicz! - Improve asset directory error messages in Pages Functions builds
Previously, when an imported asset directory was invalid, a single error message was shown: '<path>' does not exist or is not a directory. This has been split into two distinct, actionable messages:
'<path>' does not exist. Please create the directory or check the path and try again.'<path>' is not a directory. Please provide a path to a valid directory.b21eac2 Thanks @jamesopstad! - Move build output utils to new @cloudflare/build-output-utils packageb21eac2]:
Updated dependencies [`b8fd112`, `f0f2054`]:
c7aede7]:
Add defaultMimeType option to getAssetFromKV - mgrahamjo, pull/121
Some static website owners prefer not to create all of their web routes as directories containing index.html files. Instead, they prefer to create pages as extensionless HTML files. Providing a defaultMimeType option will allow users to set the Content-Type header for extensionless files to text/html, which will enable this use case.
Add defaultMimeType to types - [shagamemnon], pull/132
Adds the newly added defaultMimeType to the exported types for this package.
Fix text/* charset - EatonZ, pull/130
Adds a missing - to the utf-8 charset value in response mime types.
Cache handling for HEAD requests - klittlepage, pull/141
This PR skips caching for incoming HEAD requests, as they should not be able to be edge cached.
Updated dependencies [`d0c976c`, `d0c976c`, `0b82b15`, `d0c976c`, `90dd5e5`, `d0c976c`]:
Support cache revalidation using ETags and If-None-Match - shagamemnon, issue/62 pull/94 pull/113
Previously, cacheable resources were not looked up from the browser cache because getAssetFromKV would never return a 304 Not Modified response.
Now, getAssetFromKV sets an ETag header on all cacheable assets before putting them in the Cache API, and therefore will return a 304 response when appropriate.
Support non-ASCII characters in paths - SukkaW, issue/99 pull/105
Fixes an issue where non-ASCII paths were not URI-decoded before being looked up, causing non-ASCII paths to 404.
Support charset=utf8 in MIME type - theromis, issue/92 pull/97
Fixes an issue where Content-Type: text/* was never appended with ; charset=utf8, meaning clients would not render non-ASCII characters properly.
Fix bugs in README examples - kentonv bradyjoslin, issue/93 pull/102 issue/88 pull/116
Make @cloudflare/workers-types a dependency and update deps - ispivey, pull/107
Add Code of Conduct - EverlastingBugstopper, pull/101
Updated dependencies [`026e058`, `5b1b930`, `c7aede7`, `0aa8fa5`]:
Allow extensionless files to be served - victoriabernard92, cloudflare/wrangler/issues/980, pull/73
Prior to this PR, getAssetFromKv assumed extensionless requests (e.g. /some-path) would be set up to be served as the corresponding HTML file in storage (e.g. some-path.html).
This fix checks the ASSET_MANIFEST for the extensionless file name before appending the HTML extension. If the extensionless file exists (e.g. some-path exists as a key in the ASSET_MANIFEST) then we serve that file first. If the extensionless file does not exist, then the behavior does not change (e.g. it still looks for some-path.html).
Fix URL parsing in serveSinglePageApp - signalnerve,sgiacosa, issue/72, pull/82
This fixes an issue in serveSinglePageApp where the request.url is used as a string to retrieve static content. For example,
if a query parameter was set, the URL lookup would break. This fix uses a parsed URL instead of the string and adjusts the README.
Updated dependencies [`6dbd192`, `2194f88`, `2194f88`, `2194f88`, `2194f88`, `2194f88`, `2194f88`]:
Building and publishing to npm - victoriabernard92, [pull/78], pull/79
Added a prepack step that builds JavaScript files from the TypeScript source. This fixes previously broken npm publishes.
Updated dependencies [`b4f0c97`, `8cf78c8`, `a60ff4d`, `6946da1`, `99eb50c`]:
Support a variety of errors thrown from getAssetFromKV - victoriabernard92, issue/59 [pull/64]
Previously, getAssetFromKv would throw the same error type if anything went wrong. Now it will throw different error types so that clients can catch and differentiate them.
For example, a 404 NotFoundError error implies nothing went wrong, the asset just didn't exist while
a 500 InternalError means an expected variable was undefined.
Range Issue with Safari and videos - victoriabernard92, issue/60 pull/66
Previously, if you wanted to serve a video from Workers KV using kv-asset-handler, it would be broken on Safari due to its requirement that all videos support the Content-Range header. Cloudflare already has a feature that will handle these headers automatically, we just needed to take advantage of it by passing in a Request object to the Cache API rather than a URL string.
videos from not including the range headers.
Support custom asset namespaces passed into getAssetFromKV - victoriabernard92, issue/67 pull/68
This functionality was documented but not properly supported. Tests and implementation fixes applied.
Updated dependencies [`b5c083b`, `9c74538`, `a88d169`, `a88d169`, `daf65f2`, `a9e5abb`]:
Add handler for SPAs - ashleymichal, issue/46 pull/47
Some browser applications employ client-side routers that handle navigation in the browser rather than on the server. These applications will work as expected until a non-root URL is requested from the server. This PR adds a special handler, serveSinglePageApp, that maps all HTML requests to the root index.html. This is similar to setting a static asset route pattern in an Express.js app.
Add function API for getAssetFromKV to README.md - ashleymichal, [issue/48] [pull/52]
This function, used to abstract away the implementation for retrieving static assets from a Workers KV namespace, includes a lot of great options for configuring your own, bespoke "Workers Sites" implementation. This PR adds documentation to the README for use by those who would like to tinker with these options.
Updated dependencies [`cec9d88`]:
cec9d88]:
Improve caching - victoriabernard92, issue/38 pull/37
Don't use browser cache by default: Previously, kv-asset-handler would set a Cache-Control header on the response sent back from the Worker to the client. After this fix, the Cache-Control header will only be set if options.cacheControl.browserTTL is set by the caller.
Set default edge caching to 2 days: Previously the default cache time for static assets was 100 days. This PR sets the default to 2 days. This can be overridden with options.cacheControl.edgeTTL.
Updated dependencies [`5a56dda`, `5a56dda`, `5a56dda`, `5a56dda`, `5a56dda`, `5a56dda`, `5a56dda`, `5a56dda`, `5a56dda`, `5a56dda`, `5a56dda`, `5a56dd
5a56dda, 5a56dda, 5a56dda, 5a56dda, 5a56dda, 5a56dda, 5a56dda, 5a56dda, 5a56dda, 5a56dda, 5a56dda, 5a56dda, 5a56dda, 5a56dda, 5a56dda, 5a56dda, 5a56dda]:
Updated dependencies [`01d7020`, `48f0c6c`, `8049ca4`, `d7f38c3`, `5c25cfe`, `5e6556a`, `1f61001`]:
Updated dependencies [`fe3ae91`, `246ce92`, `c38a2c3`, `c079ba3`, `95b026e`, `c4bacec`, `3203b5d`]:
Updated dependencies [`42af66d`, `a0a091b`, `f03b108`, `4815711`, `2b390d7`, `a6c214f`, `34430b3`]:
Your coding agent can read these notes before it upgrades. Set up the MCP server →