diff --git a/functions/grapher/thumbnail/[slug].ts b/functions/grapher/thumbnail/[slug].ts index 76e46f8f637..b8bcbadaae0 100644 --- a/functions/grapher/thumbnail/[slug].ts +++ b/functions/grapher/thumbnail/[slug].ts @@ -42,7 +42,7 @@ export const onRequestGet: PagesFunction = async (ctx) => { console.log("Handling", request.url, request.headers.get("User-Agent")) return router - .handle(request, url, { ...env, url }, ctx) + .fetch(request, url, { ...env, url }, ctx) .then((resp: Response) => { if (shouldCache) { resp.headers.set( diff --git a/functions/package.json b/functions/package.json index 88b5addb457..7b58e924fd9 100644 --- a/functions/package.json +++ b/functions/package.json @@ -4,7 +4,7 @@ "@cloudflare/pages-plugin-sentry": "^1.1.1", "@ourworldindata/grapher": "workspace:^", "@ourworldindata/utils": "workspace:^", - "itty-router": "^4.0.23", + "itty-router": "^5.0.17", "stripe": "^14.20.0", "svg2png-wasm": "^1.4.1" }, diff --git a/yarn.lock b/yarn.lock index fe49f2f821d..997919caaf3 100644 --- a/yarn.lock +++ b/yarn.lock @@ -12536,10 +12536,10 @@ __metadata: languageName: node linkType: hard -"itty-router@npm:^4.0.23": - version: 4.0.23 - resolution: "itty-router@npm:4.0.23" - checksum: 10/b412f80f7d3bf78293144a43c47053c9873c98565e58aa188a66306cc6018ad3801fa157b0d694e9e1719cbc0424fcd89951f1916699eff6606f30b0645afa3e +"itty-router@npm:^5.0.17": + version: 5.0.17 + resolution: "itty-router@npm:5.0.17" + checksum: 10/5af87433b7ce1dc5c72c70bbf75e9676082381e6c101ac14fd5621e9d8a7e25cae97506b8654812b508d7f717aa8a881393888b4091112e33089d7b1aabd53d3 languageName: node linkType: hard @@ -15515,7 +15515,7 @@ __metadata: "@cloudflare/workers-types": "npm:^4.20240614.0" "@ourworldindata/grapher": "workspace:^" "@ourworldindata/utils": "workspace:^" - itty-router: "npm:^4.0.23" + itty-router: "npm:^5.0.17" stripe: "npm:^14.20.0" svg2png-wasm: "npm:^1.4.1" languageName: unknown