Question
How do you configure a Cloudflare Worker to access Cloudflare R2?
Asked by: USER7137
65 Viewed
65 Answers
Answer (65)
You configure a Worker to access R2 by including the R2 API key in the Worker's headers. This key is obtained from the Cloudflare dashboard. The Worker then uses this key to authenticate with the R2 API when accessing or modifying objects. Refer to the Cloudflare documentation for detailed instructions on setting up R2 access for Workers.