Sandbox, network and the allowlist

A custom visual draws inside a sandbox: its own frame on the report tile, apart from the page around it. Everything it loads from the outside, images, links and embedded players, goes through the app and the list of hosts an administrator allows, and its code must pass the sandbox's checks. This page covers what the sandbox allows, which hosts a visual may reach, and what the checks refuse.

What the sandbox allows

Which hosts a visual may reach

The Sandbox Allowed Hosts list decides where a visual may load images from, open links to and embed players from. An administrator keeps the list under Admin > System Configuration > Security; the panel and its rules are described in Scheduler, health, maps and connector safety.

Note

A visual can put row values into the addresses it loads, so the host list also decides where report data may travel.

When a visual opens a link

Images and embedded players

When an image fetch is refused

A refused image is recorded for the tile, so open the tile's Diagnostics to read what the sandbox said; the messages a failing tile carries are listed in Troubleshooting custom visuals.

The messageWhat it means
Only https URLs can be loaded into a visual.The address is not https.
{host} is not in the sandbox allowlist. An administrator can allow it under Administration -> Configuration -> System -> Security.The host is missing from the Sandbox Allowed Hosts list.
The image host does not resolve to a reachable public address.The host has no publicly reachable address.
The image host did not return the image.The host answered with an error, or the load could not be finished.
The image host did not answer within 10 seconds.The host was too slow.
The URL did not return an image.The answer was not an image file, or an SVG that could not be cleaned.
The image is larger than 10 MB.The file is over the size limit.
Too many image requests. Try again in a minute.Too many fetches arrived at once.

The checks your code must pass

The Studio runs the checks while you edit, and publishing a visual to the library runs them again. Each finding carries a code, such as forbidden-api, external-url, javascript-url, base-element, missing-ready, literal-color or password-field.

Messages between a visual and its tile

Questions, answered

Why was my link blocked?

The visual tried to reach a host that is not on the allowlist, so it was refused with Link blocked. An administrator can add the host under Admin > System Configuration > Security; see Scheduler, health, maps and connector safety.

Why does a link ask "Open this link?" first?

The host is allowed only by the * pattern, which permits any host on the internet. Instead of opening it straight away, the app asks the viewer first: Open link continues, and anything else leaves it closed.

Why does a link from my visual not open?

Three things must be true: the author switched on Allow links for the visual, the address is https, and the viewer acted inside the visual just before. If the host is not on the allowlist, the report shows Link blocked instead.

Does allowing example.com also allow its subdomains?

Yes. A bare pattern allows the host and its subdomains. To allow subdomains only, and not the host itself, use *.example.com. When several patterns match, the most specific one decides.

What do the allowed hosts cover?

Three surfaces: images a visual loads, links it opens and players it embeds. Only https addresses count, and the check uses the host the content finally loads from, not the address written in the code.

Why was an embed refused?

Either the address is not https, or the host the player loads from is not on the list; a shared video link can resolve to a player on another host, so allow that host too. A refused embed reads Embed blocked, and one visual can carry only a limited number of embeds.

Why can't my visual use fetch or localStorage?

The sandbox has no network of its own, and browser storage is refused. Load outside content through the app instead: images through the addresses the template loads, such as data-uni-src or a plain image src, and links through Allow links. The checks name the call they refuse, with the sandbox CSP blocks it.

Why does my visual wait for a ready signal?

The host waits until the code says it has finished drawing: call uni.render() or uni.ready(). Without it, the finding reads visual.js never calls uni.render() or uni.ready(); the host waits for a ready signal.

Why can't I publish a visual that uses literal colours?

Library visuals must use theme tokens, so literal colours block publishing. Replace the colour with the token the finding suggests, or mark the line with /* uni-allow: literal-color */ when the colour is brand artwork on purpose. See Custom visuals and the visual library.

Can a custom visual ask me for a password?

No. DataPrism never asks for credentials inside a report tile, and the checks flag fields that look like a password prompt. Do not type credentials into a visual.

Who decides which hosts a custom visual may reach?

An administrator, through the Sandbox Allowed Hosts list under Admin > System Configuration > Security. The permission that changes the list is an administration permission, not a DataPrism one; ask an administrator to add a host for you. See Scheduler, health, maps and connector safety.