Sandbox website tiles by default; opt into same-origin per widget
A website tile now runs in an opaque origin (allow-scripts, popups, forms). Its new "Trusted site" setting adds allow-same-origin for sites that need their own cookies and storage, and a trusted tile pointing at the origin the app runs on (its own, or the hub's) shows a notice instead of the frame.
This commit is contained in:
@@ -555,21 +555,34 @@ export function WidgetPanel({
|
||||
</div>
|
||||
|
||||
{widget.type === "embed" ? (
|
||||
<div className="grid gap-1.5">
|
||||
<Label className="text-sm font-normal" htmlFor="embed-url">
|
||||
Address
|
||||
</Label>
|
||||
<InfoTip label="Address">
|
||||
Any page that allows being framed. A site that refuses shows its
|
||||
own refusal in the tile.
|
||||
</InfoTip>
|
||||
<Input
|
||||
id="embed-url"
|
||||
value={str(cfg.url)}
|
||||
placeholder="https://embed.ventusky.com/?p=49.41;8.93;9"
|
||||
onChange={(event) => set({ url: event.target.value })}
|
||||
/>
|
||||
</div>
|
||||
<>
|
||||
<div className="grid gap-1.5">
|
||||
<Label className="text-sm font-normal" htmlFor="embed-url">
|
||||
Address
|
||||
</Label>
|
||||
<InfoTip label="Address">
|
||||
Any page that allows being framed. A site that refuses shows
|
||||
its own refusal in the tile.
|
||||
</InfoTip>
|
||||
<Input
|
||||
id="embed-url"
|
||||
value={str(cfg.url)}
|
||||
placeholder="https://embed.ventusky.com/?p=49.41;8.93;9"
|
||||
onChange={(event) => set({ url: event.target.value })}
|
||||
/>
|
||||
</div>
|
||||
<div className="flex items-center justify-between gap-2 text-sm">
|
||||
<FieldLabel help="Lets the page keep its own cookies and storage, which many interactive sites need to load. Only for a site you trust; this app's own address is refused.">
|
||||
Trusted site
|
||||
</FieldLabel>
|
||||
<Switch
|
||||
checked={cfg.trusted === true}
|
||||
aria-label="Trusted site"
|
||||
data-testid="embed-trusted"
|
||||
onCheckedChange={(trusted) => set({ trusted })}
|
||||
/>
|
||||
</div>
|
||||
</>
|
||||
) : widget.type === "markdown" ? (
|
||||
<div className="grid gap-1.5">
|
||||
<Label className="text-sm font-normal">Text</Label>
|
||||
|
||||
Reference in New Issue
Block a user