Releases: naturalatlas/tilestrata
Releases · naturalatlas/tilestrata
1.3.1
- Restored the ability to easily bypass all caches:
X-TileStrata-CacheSkip: *
1.3.0
- Changed behavior of
X-TileStrata-CacheSkip
header. Now the value is expected to be in the format of[layer]/[file],[layer]/[file],...
. This allows for granular control of what's being rebuilt when using tilestrata-dependency (0.4.0 required). - Upgraded etag library.
1.2.0
- Added:
"minZoom"
layer option. - Added:
"maxZoom"
layer option.
1.1.0
- Added: Introduced layer options. As of this release, there's a single
"bbox"
option that defines the extent of the layer. Any requests outside of this region will yield a 404 Not Found without touching any of the caches, providers, etc.
.layer('mylayer', {bbox: [
-111.37390136718749,
45.3297027614069,
-111.11228942871094,
45.47746617959318
]})
1.0.2
- Added
X-TileStrata-CacheHit
header to responses coming from a cache, not providers. Useful for debugging and plugins that monitor metrics (e.g. tilestrata-datadog)
1.0.1
- Bugfix: Fixed potential race condition. Response hooks that mutate headers could inadvertently affect the headers that end up being cached.
1.0.0
- Addition: Serve "robots.txt" so that search engines don't pick up tiles for image search.
- Addition: Added "qs" (query string) property to
TileRequest
. - Change: Changed response hooks to be able to modify the response's headers, buffer, and status.
- Change: Plugins are now implemented via a single
use()
method instead of distinctregisterProvider
,registerCache
,registerRequestHook
, etc methods.
Breaking Changes
- Response hooks now must provide a
reshook
property instead ofhook
. - Request hooks now must provide a
reqhook
property instead ofhook
. - Response hooks now receive the response buffer, headers, and status bundled up in an object
result
. With this style, any of those properties can be overridden easily by changing them in the object.
Chaining Syntax: Almost all of the API has changed to follow a chaining syntax. The purpose of the change is to make layer configuration files much more readable and less verbose.
// old way
server.registerLayer(function(layer) {
layer.setName('mylayer');
layer.registerRoute('t.png', function(handler) {
handler.registerCache(disk({...}));
handler.registerProvider(mapnik({...}));
});
layer.registerRoute('[email protected]', function(handler) {
handler.registerCache(disk({...}));
handler.registerProvider(mapnik({...}));
});
});
// new way
server.layer('mylayer')
.route('t.png')
.use(disk({...}))
.use(mapnik({...}))
.route('[email protected]')
.use(disk({...}))
.use(mapnik({...}));
0.7.1
- Log errors to console w/verbose debugging information.
- Added no-cache headers on requests that fail (500 status).
0.7.0
- Made listen() accept identical arguments to the http.Server listen() method. This makes it possible to set the hostname or bind to a socket instead.
strata.listen(8080, callback);
strata.listen(8080, '127.0.0.1', callback);
strata.listen(8080, '0.0.0.0', callback);
0.6.1
- Fixed default value for
method
on TileRequest objects. This fix is only precautionary – the problem being addressed shouldn't affect normal functioning of TileStrata.