Skip to content

@oneplatform/plugin-sdk


@oneplatform/plugin-sdk / FetchProxy

Interface: FetchProxy

Defined in: packages/plugin-sdk/src/types/context.ts:76

Methods

fetch()

fetch(url, init?): Promise\<Response>

Defined in: packages/plugin-sdk/src/types/context.ts:89

Proxied HTTP fetch. Only URLs declared in manifest.requiredExternalUrls are permitted. All internal OnePlatform service URLs are blocked unconditionally, even if declared.

URL matching is performed per-component on the parsed WHATWG URL: - Protocol must match exactly (https:// required; http:// is blocked) - Hostname must match exactly — no prefix/substring matching - Path matching uses glob patterns on path segments only

Parameters

url

string

init?

RequestInit

Returns

Promise\<Response>

Throws

PluginAuthError if the URL is not in the approved allowlist.