chiitiler 1.24.1 → 1.24.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -0
- package/dist/render/pool.js +4 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -167,6 +167,11 @@ Prewarm is enabled by default: one tile is rendered at startup **before** the se
|
|
|
167
167
|
|
|
168
168
|
### Cache
|
|
169
169
|
|
|
170
|
+
Renderer Maps are reused per style and rendering mode without an idle timeout.
|
|
171
|
+
They are released when their pool is evicted from the 10-entry LRU or explicitly
|
|
172
|
+
closed. This avoids repeated initialization after quiet periods, at the cost of
|
|
173
|
+
retaining native renderer memory between requests.
|
|
174
|
+
|
|
170
175
|
| Flag | Env | Default |
|
|
171
176
|
| --- | --- | --- |
|
|
172
177
|
| `--cache <none\|memory\|file\|s3\|gcs>` | `CHIITILER_CACHE_METHOD` | `none` |
|
|
@@ -220,6 +225,9 @@ const cache = ChiitilerCache.withMemoryCache(
|
|
|
220
225
|
- **Docker Compose** — see [`docker-compose.yml`](./docker-compose.yml) (includes RustFS + fake-gcs-server for local testing)
|
|
221
226
|
- **AWS Lambda** — ready-to-deploy CDK app in [`cdk/`](./cdk)
|
|
222
227
|
|
|
228
|
+
> [!WARNING]
|
|
229
|
+
> **Do not expose chiitiler directly to the public internet.** Chiitiler fetches whatever the request tells it to: the `url` style and every source, glyph, and sprite URL inside the style (`GET` or `POST`). This allows SSRF — requests to internal networks or cloud metadata endpoints — and reads of local files (`file://`, `mbtiles://`) and buckets (`s3://`, `gs://`) with the server's credentials. Accept requests only from trusted clients, e.g. behind an authenticating proxy or a private network.
|
|
230
|
+
|
|
223
231
|
## Develop
|
|
224
232
|
|
|
225
233
|
Requires Node.js 24.12+ and `sharp` system deps (see [Dockerfile](./Dockerfile)).
|
package/dist/render/pool.js
CHANGED
|
@@ -50,6 +50,10 @@ async function getRenderPool(style, cache, mode) {
|
|
|
50
50
|
destroy: (map) => {
|
|
51
51
|
map.release();
|
|
52
52
|
},
|
|
53
|
+
}, {
|
|
54
|
+
// Keep initialized Maps until their pool is evicted or closed. Disable
|
|
55
|
+
// idle housekeeping rather than running a timer in warm Lambda environments.
|
|
56
|
+
houseKeepInterval: 0,
|
|
53
57
|
});
|
|
54
58
|
mapPoolCache.set(cacheKey, newPool);
|
|
55
59
|
return newPool;
|