0.1.2
-
Features
-
Support for
defaultDocument
configuration - boemekeld, pull/161This PR adds support for customizing the
defaultDocument
option ingetAssetFromKV
. In situations where a project does not useindex.html
as the default document for a path, this can now be customized to values likeindex.shtm
:return getAssetFromKV(event, { defaultDocument: "index.shtm" })
-
-
Fixes
-
Fire
mapRequestToAsset
for all requests, if explicitly defined - Cherry, pull/159This PR fixes an issue where a custom
mapRequestToAsset
handler weren't fired if a matching asset path was found inASSET_MANIFEST
data. By correctly checking for this handler, we can conditionally handle any assets with this handler even if they exist in theASSET_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 arequestKey
based on an asset path, even if the request method is notGET
. This fixes issue/151.
-
-
Maintenance
-
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.
-
-
Documentation
-
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 usekv-asset-handler
and are exposed to end-users of Wrangler and Workers.
-