@datagraphics/delivery
Advanced tools
Changelog
[0.6.0] - 2020-06-18
Delivery
can now be passed a shouldBeCached
function to customize the logic that selects files to receive long-lived cache headers. This function is passed a single parameter — the input file path — and should return true
or false
..topojson
files will now get the content header of application/json
thanks to a custom type addition to mime
.mime
instead of mime-types
. It's smaller and makes it easy to add custom types.hasha
's breaking changes in a minor release.maxAgeOverride
is now cacheControlOverride
and expects you to provide the full string, not just the seconds for max-age=
.public, max-age=31536000, immutable
value. Files that match the text/html
content type will instead get an explicit no-cache
header. Files that do not pass either test get nothing and are at the mercy of upstream decisions.Changelog
[0.5.0] - 2020-06-16
maxAgeOverride
parameter to uploadFile
and uploadFiles
. If shouldCache
is true
and maxAgeOverride
is provided, the upload functions will use this value instead to set the cache control header.Changelog
[0.4.0] - 2020-01-26
useAccelerateEndpoint
can now be passed when initializing the Delivery
class. It will depend on the S3 bucket already having it active, however.Changelog
[0.2.0] - 2019-12-06
.woff2
, .woff
, .ttf
, .otf
) now receive cache headers.v10
. It may still work on v8
, but no promises.npm
as @datagraphics/delivery
instead of @datadesk/delivery
, which has been deprecated.