hosting

GET /v1/sites/{siteId}/cdn/canonical-host

Which hostname serves, which redirects, and whether HTTPS is forced.

Бүх hosting төгсгөлийн цэгүүд

Хөгжүүлэгчийн бүх баримт бичиг

Баталгаажуулалт

API түлхүүрийг bearer token хэлбэрээр илгөэнэ үү. Түлхүүр нь sites.view эрхтэй байх ёстой бөгөөд үүнгүйгээр 404 биш, харин 403 алдаа буцааж татгалзах болно.

Энэ төгсгөл цэг нь ямар ч байгууллагын ID шаардахгүй. Таны түлхүүр аль хэдийн харьяалагдах байгууллагыг тодорхойлж байгаа бөгөөд хариу нь тухайн байгууллагын хүрээнд хязгаарлагдана.

Туршиж үзэх

Өнцөг хаалтанд байгаа бүх зүйлийг өөрийн утгаар солиж, түлхүүр санамж байрлуулагчийг хяналтын самбарынхаа түлхүүрээр сольж оруулна уу.

curl -X GET https://api.zinndigital.com/v1/sites/{siteId}/cdn/canonical-host \
  -H "Authorization: Bearer zdk_live_…"

Та нэвтэрсэн байна уу? Таны хяналтын самбар дахь API консол нь таны бодит байгууллагын ID болон өөрийн түлхүүрийг автоматаар бөглөж, шууд ажиллаж буй API рүү хүсэлт илгээх тул та бодит хариуг харах боломжтой болно. Энэ төгсгөлийн цэгийг API консол дээр нээх

Дэлгэрэнгүй

Returns the whole serving plan rather than the two stored flags: the host that serves, the host that 301s to it, and every hostname the edge certificate must cover. A client given only canonical_host would have to work out the alias itself, and two implementations of "what is the other hostname" is exactly the drift the engine-owns-policy rule exists to prevent. certificate_hosts always contains both names, and that is the half that is invisible when testing in a browser. TLS is negotiated on the name being redirected from, so a certificate covering only the canonical host puts a full-page security interstitial in front of the alias and the visitor never reaches the redirect at all. Requires sites.view.

Параметрүүд

НэрТөрөлЗаавал шаардлагатайЭнэ юу вэ
siteId (path)UuidТиймSite ID (UUIDv7).

Хариу үйлдэл

НэрТөрөлЗаавал шаардлагатайЭнэ юу вэ
canonical_hoststring<apex, www>Тийм
force_httpsbooleanТиймRedirect http to https at the edge. Defaults to true on every new site.
serves_onstringТиймThe hostname that actually serves.
redirects_fromstringТиймThe hostname that permanently redirects to serves_on.
redirect_statusintegerТиймAlways 301. A 302 tells search engines to keep indexing the alias, which leaves the duplicate-content problem unsolved while looking correct in a browser.
certificate_hostsstring[]ТиймBoth hostnames, always. TLS is negotiated on the name being redirected from, so a certificate covering only serves_on puts a security interstitial in front of the alias and…
apex_deliverystring<native, alias, a_records, unsupported>ТиймHow the zone apex is made to resolve. A bare apex cannot be a CNAME, so on a pull-zone CDN it resolves only through CNAME-flattening/ALIAS at the DNS provider, or through A/AAAA…
apex_deliverablebooleanТиймfalse when neither mechanism is available for this CDN/DNS pairing. The combination is refused rather than accepted, because the alternative provisions cleanly, reports healthy,…

Энэ төгсгөл цэгээс буцааж болох алдаанууд

401 · 403 · 404 · 422 · 429