fix(cf-pages): service binding does not support cf images

This commit is contained in:
Ming Di Leom 2024-10-06 21:27:23 +00:00
parent fd4c2043a6
commit a6a4387776
No known key found for this signature in database
GPG Key ID: 32D3E28E96A695E8
1 changed files with 1 additions and 5 deletions

View File

@ -6,9 +6,5 @@ export async function onRequestGet (context) {
const imageRequest = new Request(imageURL, { const imageRequest = new Request(imageURL, {
headers headers
}) })
// return fetch(imageRequest) return fetch(imageRequest)
// CF_IMAGES binds to cf-images worker
// configured in the pages dashboard
return context.env.CF_IMAGES.fetch(imageRequest)
} }