Skip to content

Commit 6ef4d15

Browse files
authored
Update packages/cloudflare/src/cli/templates/worker.ts
1 parent b742f0e commit 6ef4d15

File tree

1 file changed

+1
-1
lines changed
  • packages/cloudflare/src/cli/templates

1 file changed

+1
-1
lines changed

packages/cloudflare/src/cli/templates/worker.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export default {
4040
return new Response("Not Found!", { status: 404 });
4141
}
4242
const imageUrl = m.groups!.url!;
43-
if (imageUrl.startsWith("http://") || imageUrl.startsWith("https://")) {
43+
if (imageUrl.match(/^https?:\/\//)) {
4444
return fetch(imageUrl, { cf: { cacheEverything: true } });
4545
}
4646
return env.ASSETS.fetch(new URL(`/${imageUrl}`, url));

0 commit comments

Comments
 (0)