Load an embedded policy decision point (PDP) bundle from a given source.
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 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.
Fetch an embedded PDP bundle via HTTP in a supported browser or Node.js:
const loader = new Loader("https://lite.cerbos.cloud/bundle?workspace=...&label=...");
Resolves to the metadata of the loaded bundle, or rejects with the error that was encountered when loading the bundle.
Loads an embedded policy decision point bundle from a given source.