function buildFrameAncestors
buildFrameAncestors(hosts: string[]): string | null

Build a frame-ancestors CSP value from allowed embed hosts. Returns null if the list is empty (allow embedding from anywhere).

Parameters

hosts: string[]

Return Type

string | null

Usage

import { buildFrameAncestors } from "doc.ts";