Function: detectDomainKind()
ts
function detectDomainKind(url): DomainKind;Defined in: domain.ts:17
Classifies a CDN host:
legacy—ucarecdn.com(and its environment subdomains)prefixed— project-prefixed*.ucarecd.netproxy— delivery proxy*.ucr.iocustom— anything else (user CNAME)
Parameters
| Parameter | Type |
|---|---|
url | string |
Returns
Throws
TypeError on unparseable input.
See
https://uploadcare.com/docs/delivery/cdn/
Example
ts
detectDomainKind('https://1zlmtnsbgr.ucarecd.net') // → 'prefixed'