Cloudflare Worker integration
Cloudflare Worker integrations enable Cloudflare's Edge Network to distribute your JavaScript-based functions when an event occurs in Ably.
Create a Cloudflare Worker integration
To create a Cloudflare Worker integration in your dashboard:
- Login and select the application you wish to integrate with a Cloudflare Worker.
- Click the Integrations tab.
- Click the New Integration Rule button.
- Choose Webhook.
- Choose Cloudflare Workers.
- Configure the Cloudflare Worker settings.
- Click Create.
You can also create a Cloudflare Worker integration using the Control API.
Settings
The following settings are available when creating a Cloudflare Worker integration:
| Setting | Description |
|---|---|
| URL | The URL of the Cloudflare Worker to POST a summary of events to. |
| Headers | Allows the inclusion of additional information in key-value format. |
| Request Mode | Choose between Single Request or Batch Request. |
| Event types | Specifies the event types being sent to Cloudflare Workers. |
| Channel filter | Filters the source channels based on a regular expression. |
| Encoding | Specifies the encoding format of messages. Either JSON or MsgPack. |
| Sign with key | Payloads will be signed with an API key so they can be validated by your servers. Only available when Request Mode is set to Batched. |