1
2
3
4
5
6
7
8
9
10
import { fetch } from "https://esm.town/v/std/fetch";
export const proxyJpeg = async (request: Request): Promise<Response> => {
const url = new URL(request.url).searchParams.get("url");
const response = await fetch(url);
const blob = await response.arrayBuffer();
return new Response(blob, {
headers: { "Content-Type": "image/jpeg" },
});
};