interface Env { ORIGIN_URL: string; ORIGIN_AUTH_HEADER: string; } export default { async fetch(request: Request, env: Env) { const payload = await request.text(); const proxyRequest = new Request(env.ORIGIN_URL, { method: request.method, body: payload || null, headers: { 'Authorization': env.ORIGIN_AUTH_HEADER, 'Content-Type': 'application/json', }, }); return fetch(proxyRequest); }, };