Colibrio Reader Framework API - Cloud license
    Preparing search index...

    Options that defines if content-documents can load remote resources. What type of remote resources they can load, and from where these can be loaded.

    Please note that you may need to specify directives in your app's Content-Security-Policy as a element or as a HTTP header as well since these are inherited by child iframes used for rendering content-documents.

    interface IEpubRemoteResourceOptions {
        iframeDomainsToRenderAsOverlay?: string[];
        policyType?: EpubRemoteResourcePolicyType;
        sandboxSameOriginIframes?: boolean;
        whitelistDirectives?: IEpubRemoteResourceWhitelistDirective[];
    }

    Properties

    iframeDomainsToRenderAsOverlay?: string[]

    A list of domains. If an iframe's src URL matches any domain in the list, the iframe will be rendered in the top window instead of within the EPUB content document iframe.

    This is useful because EPUB content documents are often loaded using blob: URLs, which causes nested iframes to inherit an opaque origin. Some third-party sites (like YouTube) do not support loading inside a blob: origin and require a proper origin to send correct origin headers.

    Domains can include wildcards (e.g., *.youtube.com), or * to match any domain. Note that a wildcard pattern like *.youtube.com will also match the base domain youtube.com.

    Note that iframes matching these domains will load in the top window overlay, bypassing policyType and whitelistDirectives.

    []
    

    Defines what policy to use for remote resources.

    DENY_ALL
    
    sandboxSameOriginIframes?: boolean

    Determines whether iframes loading URLs from the same origin as the reading system's origin should be sandboxed without allow-same-origin.

    If true, allow-same-origin will be omitted from the sandbox attribute for same-origin URLs, forcing the iframe into a unique origin. If false, allow-same-origin is included in the sandbox attribute.

    Setting this to false could pose a security risk when loading third-party EPUBs. Malicious EPUBs could load pages from your web app's domain, potentially executing scripts in the reading system's context performing actions on behalf of the user.

    true
    

    Only used if policy type is set to WHITELIST.

    Defines a list of directives with sources according to the Content-Security-Policy standard. Please see https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy# for more information

    []