Look at our documentation about our Cloudflare integration here: https://redirection.io/documentation/developer-documentation/cloudflare-workers-integration
You can also directly push this repository to a cloudflare worker, but you will still need a redirection.io account to do so:
- You need to have wrangler 2 installed:
npm install -g wrangler
- Login or configure the Cloudflare API token:
wrangler login
- Copy the file
wrangler.toml.dist
towrangler.toml
, and replace the value - Push the redirection.io project key as a secret value:
wrangler secret put REDIRECTIONIO_TOKEN
(enter the project key when asked to do so - this key can be found on the instance panel in the manager) - Publish the worker:
wrangler publish
This code is licensed under the MIT License - see the LICENSE file for details.