timetable-api-node 1.7.9 → 1.7.11
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/index.ts +6 -1
- package/package.json +1 -1
package/index.ts
CHANGED
|
@@ -408,11 +408,16 @@ app.get("/robots.txt", (req, res) => {
|
|
|
408
408
|
"# Non-standard hint for AI agent discovery:",
|
|
409
409
|
`# mcp-server: ${baseUrl}/.well-known/mcp/server-card.json`,
|
|
410
410
|
];
|
|
411
|
+
setStaticAssetCache(res);
|
|
411
412
|
res.type("text/plain").send(lines.join("\n"));
|
|
412
413
|
});
|
|
413
414
|
|
|
414
415
|
app.get("/last-modified.txt", (req, res, next) => {
|
|
415
|
-
|
|
416
|
+
// Written by every image build from the GTFS feed's Last-Modified, so a data
|
|
417
|
+
// refresh changes it: "short", not "long".
|
|
418
|
+
res
|
|
419
|
+
.set("Cache-Control", `public, max-age=0, s-maxage=${5 * 60}`)
|
|
420
|
+
.set("Cache-Tag", "short");
|
|
416
421
|
res.sendFile(path.join(__dirname, "last-modified.txt"));
|
|
417
422
|
});
|
|
418
423
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "timetable-api-node",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.11",
|
|
4
4
|
"description": "Lviv (Ukraine) public transport REST API and read-only Model Context Protocol (MCP) server: stops, timetables, routes, live vehicle positions, GTFS/GTFS-RT. No API key required.",
|
|
5
5
|
"main": "index.ts",
|
|
6
6
|
"type": "module",
|