dkfdkdodkms
05/15/2023, 12:16 AMasync fetch(request:Request, env:Env, context:ExecutionContext):Promise<Response>
{
let response = new Response('{}');
response.headers.set('Access-Control-Allow-Headers', 'Content-Type, X-Json');
response.headers.set('Access-Control-Allow-Origin', '*');
response.headers.set('Access-Control-Allow-Methods', 'POST, GET, OPTIONS');
response.headers.set('Access-Control-Max-Age', '86400');
return response;
}
The above works fine with requests without a body. When I add a body to the request the request is stuck in 'pending' status. Just adding this options.body = body;
causes the issue.
Accept:
*/*
Accept-Encoding:
gzip, deflate, br
Accept-Language:
en-US,en;q=0.9
Cache-Control:
no-cache
Connection:
keep-alive
Content-Length:
1780366
Content-Type:
application/octet-stream
Host:
127.0.0.1:8081
Origin:
http://localhost
Pragma:
no-cache
Referer:
http://localhost/
Sec-Ch-Ua:
"Google Chrome";v="113", "Chromium";v="113", "Not-A.Brand";v="24"
Sec-Ch-Ua-Mobile:
?0
Sec-Ch-Ua-Platform:
"macOS"
Sec-Fetch-Dest:
empty
Sec-Fetch-Mode:
cors
Sec-Fetch-Site:
cross-site
User-Agent:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Safari/537.36
dkfdkdodkms
05/15/2023, 12:57 AMdkfdkdodkms
05/15/2023, 2:06 AMdkfdkdodkms
05/15/2023, 4:38 PM