hosting
GET /v1/sites/{siteId}/geo-restriction
Which countries may reach this site.
ការផ្ទៀងផ្ទាត់ភាពត្រឹមត្រូវ
បញ្ជូនសោ API ជា bearer token។ សោនេះត្រូវតែមានសិទ្ធិ sites.view។ សោដែលគ្មានសិទ្ធិនេះនឹងត្រូវបដិសេធដោយកូដ 403 មិនមែន 404 ទេ។
ចំនុចបញ្ចប់នេះមិនត្រូវការលេខសម្គាល់ស្ថាប័នទេ។ ពស័្ដកូនរបស់អ្នករួចហើយកំណត់អត្តសញ្ញាណស្ថាប័នដែលវាជាកម្មសិទ្ធិ ហើយការឆ្លើយតបគឺត្រូវបានកំណត់វិសាលភាពទៅតាមនោះ។
សាកល្បង
ជំនួសអ្វីមួយនៅក្នុងសញ្ញាពងក្រពើ < > ដោយប្រើតម្លៃផ្ទាល់ខ្លួនរបស់អ្នក ហើយជំនួសកន្លែងរក្សាទុកសោដោយប្រើសោចេញពីផ្ទាំងគ្រប់គ្រងរបស់អ្នក។
curl -X GET https://api.zinndigital.com/v1/sites/{siteId}/geo-restriction \
-H "Authorization: Bearer zdk_live_…"បានចូលគណនីរួចហើយមែនទេ? កុងសូល API ក្នុងផ្ទាំងគ្រប់គ្រងរបស់អ្នក បំពេញលេខសម្គាល់ស្ថាប័នពិតប្រាកដរបស់អ្នក និងសោផ្ទាល់ខ្លួនរបស់អ្នក ហើយដំណើរការសំណើទល់នឹង API ផ្ទាល់ ដូច្នេះអ្នកអាចមើលឃើញការឆ្លើយតបពិតប្រាកដ។ បើកចំណុចបញ្ចប់នេះក្នុងកុងសូល API
ព័ត៌មានលម្អិត
The site's country rule and what each enforcement layer is doing about it. Not under /cdn/, deliberately. A country rule is a site control with up to two enforcement points — the CDN edge and the origin server — and a site with no CDN still gets it at the origin. It applies on every product line. The edge state is read from the provider, not from our record. "We asked for it" and "it is set" are different claims: they diverge when a customer edits the rule in their own CDN dashboard, after a CDN switch, or after a failed apply. Read edge and origin separately — a rule live at one layer only is a real, partial state, and enforcing: false with a detail means the layer is not protecting the site whatever mode says. Requires sites.view.
ប៉ារ៉ាម៉ែត្រ
| ឈ្មោះ | ប្រភេទ | តម្រូវការ | តើវាជាអ្វី |
|---|---|---|---|
siteId (path) | Uuid | បាទ/ចាស | Site ID (UUIDv7). |
ផ្អាកដំណើរការ
| ឈ្មោះ | ប្រភេទ | តម្រូវការ | តើវាជាអ្វី |
|---|---|---|---|
mode | string<off, allow, block> | បាទ/ចាស | allow admits only the listed countries and refuses everywhere else; block refuses the listed ones and serves everywhere else; off is no rule at all. |
countries | string[] | បាទ/ចាស | ISO-3166 alpha-2, upper-case. Empty when mode is off. |
exempt_search_engines | boolean | បាទ/ចាស | Whether verified search-engine crawlers were asked to bypass the rule. |
search_engines_exempt_at_edge | boolean | បាទ/ចាស | Whether that exemption is actually in force, which is not the same as whether it was requested — only a provider that verifies a crawler by forward/reverse DNS can carry it.… |
edge | GeoRestrictionLayer | បាទ/ចាស | What ONE enforcement layer can do, and what it is doing right now. Four fields rather than one flag because "this provider cannot do it" and "it failed this morning" need… |
origin | GeoRestrictionLayer | បាទ/ចាស | What ONE enforcement layer can do, and what it is doing right now. Four fields rather than one flag because "this provider cannot do it" and "it failed this morning" need… |
កំហុសដែលចំណុចបញ្ចប់នេះអាចបង្វិលត្រឡប់មកវិញ
401 · 403 · 404 · 429