若需要禁用或移除 per-hostname Authenticated Origin Pulls 配置,请按以下步骤操作。
-
使用
PUT请求 在主机名上禁用 Authenticated Origin Pulls。
At least one of the following token permissions is required:Required API token permissions
SSL and Certificates Write
Enable or Disable a Hostname for Client Authenticationbash curl "https://api.cloudflare.com/client/v4/zones/$ZONE_ID/origin_tls_client_auth/hostnames" \ --request PUT \ --header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \ --json '{ "config": [ { "enabled": false, "cert_id": "<CERT_ID>", "hostname": "<YOUR_HOSTNAME>" } ] }' -
(可选)使用
GET请求 获取客户端证书 ID 列表。下一步移除证书时需要您要移除的证书 ID。
At least one of the following token permissions is required:Required API token permissions
SSL and Certificates WriteSSL and Certificates Read
List Certificatesbash curl "https://api.cloudflare.com/client/v4/zones/$ZONE_ID/origin_tls_client_auth/hostnames/certificates" \ --request GET \ --header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" -
使用 Delete hostname client certificate 端点移除您上传的证书。
At least one of the following token permissions is required:Required API token permissions
SSL and Certificates Write
Delete Hostname Client Certificatebash curl "https://api.cloudflare.com/client/v4/zones/$ZONE_ID/origin_tls_client_auth/hostnames/certificates/$CERTIFICATE_ID" \ --request DELETE \ --header "Authorization: Bearer $CLOUDFLARE_API_TOKEN"