hosting
PUT /v1/sites/{siteId}/cdn/firewall-rules
Replace a site's custom edge firewall rules.
אימות
שלחו מפתח API כאסימון נושא (bearer token). על המפתח לכלול את הרשאה hosting.cdn.manage; מפתח שאינו כולל אותה יידחה בסטטוס 403, ולא 404.
נקודת קצה זו אינה דורשת מזהה ארגון. המפתח שלך כבר מזהה את הארגון שאליו הוא שייך, והתגובה מוגבלת אליו בלבד.
נסה זאת
החלף כל דבר בסוגריים זוויתיים בערכים משלך, ואת מציין מיקום המפתח במפתח מלוח הבקרה שלך.
curl -X PUT https://api.zinndigital.com/v1/sites/{siteId}/cdn/firewall-rules \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ "rules": <object[]> }'מחובר? קונסולת ה-API בלוח הבקרה שלך מזינה את מזהה הארגון האמיתי שלך ואת המפתח שלך, ומריצה את הבקשה מול ה-API הפיזי כך שתוכל לראות את התגובה בפועל. פתח נקודת קצה זו במסוף ה-API
פרטים
**Convergent and whole-list.** The body is the complete ordered rule set and the provider is made to match it exactly, including removing what is gone. A client must send back every rule it was shown — `foreign` ones included — because sending a subset deletes the rest. **Order is the security property, not presentation.** Cloudflare's custom-rules phase is terminating: the first matching rule decides and no later rule runs, so reordering the list changes which rule wins. Requires `hosting.cdn.manage`. A provider without custom rules is a `422` with code `UNSUPPORTED_BY_PROVIDER`.
פרמטרים
| שם | סוג | נדרש | מה זה |
|---|---|---|---|
siteId (path) | Uuid | כן | Site ID (UUIDv7). |
גוף הבקשה
| שם | סוג | נדרש | מה זה |
|---|---|---|---|
rules | object[] | כן | — |
תשובה
| שם | סוג | נדרש | מה זה |
|---|---|---|---|
supported | boolean | כן | — |
rules | CdnFirewallRule[] | כן | In evaluation order. The provider's custom-rules phase is terminating — the first match decides. |
שגיאות שנקודה קצה זו עשויה להחזיר
401 · 403 · 404 · 422 · 429 · 503