Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Replace `request.clone()` with `new Request(...)` I received this warning while running in Cloudflare Workers: ``` Your worker called response.clone(), but did not read the body of both clones. This is wasteful, as it forces the system to buffer the entire response body in memory, rather than streaming it through. This may cause your worker to be unexpectedly terminated for going over the memory limit. If you only meant to copy the response headers and metadata (e.g. in order to be able to modify them), use `new Response(response.body, response)` instead ``` This is the only `.clone()` I could find in my worker, and updating this removed the warning. My app still appears to be working correctly * Update src/authenticator.ts Co-authored-by: Sergio Xalambrí <[email protected]> Co-authored-by: Sergio Xalambrí <[email protected]>
- Loading branch information