This is a Cloudflare R2 worker project named cfr2-proxy
.
This project is designed to proxy requests to Cloudflare R2 storage. It uses AWS signature version 4 for authentication.
- Get file from Cloudflare R2 storage.
- Upload files to Cloudflare R2 storage.
The main entry point of the application is src/index.ts
. The worker's configuration is defined in src/worker-configuration.d.ts
. The project configuration is in wrangler.toml
.
- Clone the repository.
- Install the dependencies with
npm install
. - Copy
wrangler.toml.example
towrangler.toml
and fill in your Cloudflare account details and R2 bucket information.
To start the development server, run npm run dev
.
To deploy the worker, run npm run deploy
.
The worker requires the following environment variables:
account_id
: Your Cloudflare account ID.access_key_id
: Your Cloudflare R2 access key ID.secret_access_key
: Your Cloudflare R2 secret access key.
These are set in the wrangler.toml
file.
This project follows the TypeScript code style. The configuration is in .editorconfig
and tsconfig.json
.
Currently, there are no tests specified for this project.
This project is licensed under the ISC license.