Skip to content

Commit 8bf1e9d

Browse files
committed
documentation
1 parent 8487f7c commit 8bf1e9d

File tree

2 files changed

+11
-10
lines changed

2 files changed

+11
-10
lines changed

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
## Cloudlfare worker for redirection.io
22

3-
Look at our documentation about cloudflare integration here : [https://redirection.io/documentation/developer-documentation/cloudflare-workers-integration](https://redirection.io/documentation/developer-documentation/cloudflare-workers-integration)
3+
Look at our documentation about our Cloudflare integration here: [https://redirection.io/documentation/developer-documentation/cloudflare-workers-integration](https://redirection.io/documentation/developer-documentation/cloudflare-workers-integration)
44

5-
### Pushing to cloudflare
5+
### Pushing to Cloudflare
66

7-
You can also directly push this repository to a cloudflare worker, but you will still need a redirection io account to do so:
7+
You can also directly push this repository to a cloudflare worker, but you will still need a redirection.io account to do so:
88

9-
1. You need to have wrangler installed: `npm install -g wrangler`
10-
2. Login or configure your api token for cloudflare `wrangler login`
11-
3. Copy file `wrangler.toml.dist` to `wrangler.toml` and replace needed value
12-
4. Push your redirection io token as a secret value `wrangler secret put REDIRECTIONIO_TOKEN` and enter you redirection io project key when asked (available in your the instance panel of your project)
13-
5. Publish your worker: `wrangler publish`
9+
1. You need to have wrangler 2 installed: `npm install -g wrangler`
10+
2. Login or configure the Cloudflare API token: `wrangler login`
11+
3. Copy the file `wrangler.toml.dist` to `wrangler.toml`, and replace the value
12+
4. 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)
13+
5. Publish the worker: `wrangler publish`
1414

1515
## License
1616

wrangler.toml.dist

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
1+
# see documentation at https://redirection.io/documentation/developer-documentation/cloudflare-workers-integration#manually-deploying-the-cloudflare-worker
2+
13
account_id = "account_id"
24
name = "worker_name_on_cloudflare"
3-
route = "route_name"
5+
route = "{ pattern = "*example.com/*", zone_id = "abcdef0123456789abcdef0123456789" }"
46
workers_dev = false
57
compatibility_date = "2022-01-20"
68
main = "build/worker/shim.mjs"
79

810
[vars]
9-
WORKERS_RS_VERSION = "0.0.15"
1011
REDIRECTIONIO_ADD_HEADER_RULE_IDS = false
1112
REDIRECTIONIO_INSTANCE_NAME = "instance_name_on_redirectionio"
1213
REDIRECTIONIO_TIMEOUT = 5000

0 commit comments

Comments
 (0)