Cerbos JavaScript SDK
    Preparing search index...

    Class AutoUpdatingLoader

    Loads an embedded policy decision point bundle from a given URL, and polls for updates.

    Hierarchy (View Summary)

    Index

    Constructors

    Accessors

    Methods

    Constructors

    • Load an embedded policy decision point bundle from a given URL.

      Parameters

      • url: string | URL

        URL from which to stream bundles.

      • options: AutoUpdateOptions = {}

        Additional settings.

      Returns AutoUpdatingLoader

      Bundle download URLs are available in the "Embedded" section of the "Decision points" page of your Cerbos Hub workspace.

      The bundle will be loaded in the background when the loader is created. If initial loading fails, then the first request from the client using the loader will throw an error. To detect failure to load the bundle before making any requests, provide an Options.onError callback or await the Loader.active method.

      Failure to load updates after the initial load will not cause requests from the client to throw errors, but errors will be passed to the Options.onError callback.

    Accessors

    Methods