IResourceLoadingOptions class

IResourceLoadingOptions class

Controls how resources referenced from outside a document (remote URLs, UNC paths, local files) are loaded while the document is processed.

External resources are not loaded unless the caller allows them: loading a remote or local resource named by an untrusted document can reach internal network addresses, leak Windows credentials through UNC paths, or copy local files into the output.

Content carried inside the document (data: and cid: references, packaged parts) is not external and still loads.

The IResourceLoadingOptions type exposes the following members:

Properties

Property Description
external_resource_handler The handler that is called for every external resource before it is loaded and can allow, skip, or replace it. Default value is None.
skip_external_resources The flag indicating whether external resources are loaded.
whitelisted_resources The absolute URI prefixes of external resources that are loaded while IResourceLoadingOptions.skip_external_resources is true, for example https://cdn.example.com/assets/ or file:///C:/assets/.

See Also