2021-09-26 15:25:58 +02:00
|
|
|
|
<!-- DO NOT EDIT THIS FILE! -->
|
|
|
|
|
<!-- Instead edit contrib/cloudflare.php -->
|
|
|
|
|
<!-- Then run bin/docgen -->
|
|
|
|
|
|
2022-07-26 09:18:44 +02:00
|
|
|
|
# Cloudflare Recipe
|
2021-09-26 15:25:58 +02:00
|
|
|
|
|
2022-09-12 12:29:44 +02:00
|
|
|
|
```php
|
|
|
|
|
require 'contrib/cloudflare.php';
|
|
|
|
|
```
|
2021-09-26 15:25:58 +02:00
|
|
|
|
|
2022-09-12 12:29:44 +02:00
|
|
|
|
[Source](/contrib/cloudflare.php)
|
2021-11-06 19:02:51 +01:00
|
|
|
|
|
2021-09-26 15:25:58 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
### Configuration
|
|
|
|
|
|
|
|
|
|
- `cloudflare` – array with configuration for cloudflare
|
|
|
|
|
- `service_key` – Cloudflare Service Key. If this is not provided, use api_key and email.
|
|
|
|
|
- `api_key` – Cloudflare API key generated on the "My Account" page.
|
|
|
|
|
- `email` – Cloudflare Email address associated with your account.
|
2022-12-15 21:28:20 +05:30
|
|
|
|
- `api_token` – Cloudflare API Token generated on the "My Account" page.
|
|
|
|
|
- `domain` – The domain you want to clear (optional if zone_id is provided).
|
2021-09-26 15:25:58 +02:00
|
|
|
|
- `zone_id` – Cloudflare Zone ID (optional).
|
|
|
|
|
|
|
|
|
|
### Usage
|
|
|
|
|
|
|
|
|
|
Since the website should be built and some load is likely about to be applied to your server, this should be one of,
|
|
|
|
|
if not the, last tasks before cleanup
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
## Tasks
|
|
|
|
|
|
|
|
|
|
### deploy:cloudflare
|
2022-12-15 21:28:20 +05:30
|
|
|
|
[Source](https://github.com/deployphp/deployer/blob/master/contrib/cloudflare.php#L23)
|
2021-09-26 15:25:58 +02:00
|
|
|
|
|
2021-11-08 22:59:39 +01:00
|
|
|
|
Clears Cloudflare Cache.
|
2021-09-26 15:25:58 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|