有効化
By default, Version Management is not enabled on a zone.
To enable Version Management ↗:
- Log in to the Cloudflare dashboard ↗.
- Select your account and zone.
- Go to Version Management.
- Select Enable versioning.
Once you enable Version Management, Cloudflare will automatically create:
- Version Zero, think about this as the configuration of your current zone. Once default environments are created, Version Zero is automatically deployed to them, guaranteeing no disruption in your live traffic. This Version is also permanently editable. In case you decide to disable Zone Versioning, Version Zero will become your zone again.
- Global Configuration, you can find all the configurations here that are not supported by Version Management.
On the Environments page, you can create default environments for Production, Staging, and Development.
ゾーンバージョン管理を無効にするには:
-
バージョンゼロがあなたのゾーンに対して正しい設定を持っていることを確認します:
-
/zones/{zone_id}/environmentsエンドポイントにGETリクエストを送信します。Terminal window curl "https://api.cloudflare.com/client/v4/zones/{zone_id}/environments" \--header "X-Auth-Email: <EMAIL>" \--header "X-Auth-Key: <API_KEY>"レスポンスで、次の値を保存します:
- 各ルールの環境
ref
- 各ルールの環境
-
それらの環境の
refを使用して、各環境の/zones/{zone_id}/environments/{ref}エンドポイントにDELETEリクエストを送信します。Terminal window curl --request DELETE \"https://api.cloudflare.com/client/v4/zones/{zone_id}/environments/{ref}" \--header "X-Auth-Email: <EMAIL>" \--header "X-Auth-Key: <API_KEY>" -
次に、すべてのHTTPアプリケーション(またはゾーンのバージョン)を見つけるために
GETリクエストを送信します。Terminal window curl "https://api.cloudflare.com/client/v4/zones/{zone_id}/http_applications" \--header "X-Auth-Email: <EMAIL>" \--header "X-Auth-Key: <API_KEY>"各HTTPアプリケーションの
idを保存します。 -
それらのHTTPアプリケーションの
idを使用して、各アプリケーションに対してDELETEリクエストを送信します。Terminal window curl --request DELETE \"https://api.cloudflare.com/client/v4/zones/{zone_id}/http_applications/{http_application_id}" \--header "X-Auth-Email: <EMAIL>" \--header "X-Auth-Key: <API_KEY>"
これらのすべてのステップが完了すると、ゾーンバージョン管理は元のランディングページに戻ります。