Header

Configuring a Cloudflare R2 Bucket

First, select Cloudflare R2 in the server protocol selector.

Select Server protocol R2 latest

Then, enter your bucket name, your account ID, access ID and secret key. Details on how to obtain these auth credentials can be found here.

Once done, if you want to upload your files to a different folder from your bucket's root directory, you can also enter the deployment directory of your choice in the Path Prefix.

Cloudflare R2 server details

R2 Request Headers

Within the R2 Request Headers section, you can configure specific metadata to send along with files matching a given pattern.

You may, for example, wish to send a Cache-Control header for all files, or a Content-Disposition header for all files of a certain type or even in a certain directory, to force them to be downloaded rather than rendered inline in the end-user's browser.

Add as many files as you like within this section, starting with the Header Key and Header Value, followed by a pattern.

Cloudflare R2 request headers

Tree

Proudly powered by Katapult. Running on 100% renewable energy.