Skip to content

Function: parseProxyUrl() ​

ts
function parseProxyUrl(url): ParsedProxyUrl;

Defined in: parse.ts:70

Parses a delivery proxy URL. Narrower than parseCdnUrl: importing this alone leaves the file and group parsers out of your bundle.

Parameters ​

ParameterType
urlstring

Returns ​

ParsedProxyUrl

Throws ​

TypeError when the URL carries no embedded source.

See ​

https://uploadcare.com/docs/delivery/proxy/

Example ​

ts
parseProxyUrl('https://pk.ucr.io/-/preview/https://example.com/a.jpg')
// → { kind: 'proxy', cdnBase: 'https://pk.ucr.io', operations: [...], sourceUrl: 'https://example.com/a.jpg' }