hosting
PUT /v1/sites/{siteId}/cdn/firewall-rules
Replace a site's custom edge firewall rules.
Tabbatar da Asali
Aika maɓallin API azaman alamar ɗauka (bearer token). Dole ne maɓallin ya kasance yana da izinin hosting.cdn.manage; idan babu shi, za a ƙi amfani da maɓallin tare da lambar 403, ba 404 ba.
Wannan wurin ƙarewa ba ya buƙatar ID na ƙungiya. Maɓallin ku ya riga ya gano ƙungiyar da yake ciki, kuma an iyakance amsa a kanta.
Gwada
May gurbin komai da ke cikin kusurwa da ƙimar ka, kuma may gurbin maballi da maballi daga allon sarrafa ka.
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[]> }'An shiga? Na'urar sarrafa API da ke cikin sashin kulawarka tana cika ainihin lambar ƙungiyarka da maɓallinka naka, sannan tana gudanar da buƙatar a kan ainihin API don haka zaka iya ganin amsar gaske. Buɗe wannan tashar a cikin na'urar kula da API
Bayani
**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`.
Sigogi
| Suna | Nau'i | Ana buƙata | Abin da yake |
|---|---|---|---|
siteId (path) | Uuid | Eh | Site ID (UUIDv7). |
Jikin buƙata
| Suna | Nau'i | Ana buƙata | Abin da yake |
|---|---|---|---|
rules | object[] | Eh | — |
Martani
| Suna | Nau'i | Ana buƙata | Abin da yake |
|---|---|---|---|
supported | boolean | Eh | — |
rules | CdnFirewallRule[] | Eh | In evaluation order. The provider's custom-rules phase is terminating — the first match decides. |
Kuskuren da wannan matsaya za ta iya maido wa
401 · 403 · 404 · 422 · 429 · 503