Strict CSP, without the connect/frame guidance
Lokl: https://lokl-web.basharatusman-a.workers.dev · organization lokl-test-account
Expected on this host (an allowed website)
What breaks: the page's own policy forbids contacting or framing Lokl (default-src 'self' covers both). Under the list embed you get a blank rectangle (about 560 px tall) and under the button a small blank one; the "Policy violations this page saw" list (and the console) show, per embed, the loader's preflight fetch blocked by connect-src and then the frame blocked by frame-src. The loader itself still ran. Nothing renders and nothing tells the visitor why.
If you see the plain "Book now" link instead, embed-lab.allegco.com is not on the organization's allowed websites yet: that is the blocked result, and a mismatch for this host.
Expected on this host (not an allowed website)
What breaks, and it is different here: the loader asks Lokl first whether this website may embed, but the page's policy blocks that request, so Lokl never hears from this website. The loader then tries to show the frame and the page's policy blocks that too. Result: blank rectangles, and no plain Book link, because the link only appears when Lokl answers "not allowed". No blocked-website record is made (the request never leaves the browser).
The "Policy violations this page saw" list below shows connect-src and frame-src entries naming the Lokl address (the console has the same "Refused to…" errors). The browser's network log shows no request to Lokl's /config at all.
The page's Content-Security-Policy
Sent as a response header by this page (see _headers). No inline scripts or styles are used on this page.
default-src 'self'; script-src 'self' https://lokl-web.basharatusman-a.workers.dev; img-src 'self' data:; style-src 'self'; base-uri 'self'; form-action 'self'Where the "guidance" comes from
Lokl's Settings › Embed screen (origin/main) contains no operator CSP guidance text. Its messages only say "Only these sites can show your embeds. Anywhere else, visitors see a plain book button." So this page applies what the code requires, derived from public/widget.js and docs/agents/codebase.md:
script-src https://lokl-web.basharatusman-a.workers.dev: the page loadshttps://lokl-web.basharatusman-a.workers.dev/widget.js. (In both variants, otherwise nothing runs.)connect-src https://lokl-web.basharatusman-a.workers.dev: the loader callshttps://lokl-web.basharatusman-a.workers.dev/embed/lokl-test-account/configfirst (widget.js:fetch(config.toString(), { credentials: "omit" }); codebase.md "Preflight").frame-src https://lokl-web.basharatusman-a.workers.dev: the loader inserts an<iframe src="https://lokl-web.basharatusman-a.workers.dev/embed/lokl-test-account?…">.
Quoted from widget.js: "CSP connect-src, offline, rate limits and transient failures must not break a working frame integration. Mount as before; frame-ancestors remains the security boundary." That is why a missing connect-src alone still mounts the frame.
Policy violations this page saw
- None.
Each box is what Settings › Embed copies for that embed. This page loads widget.js once, at the bottom.
1. list
<div data-lokl-book="lokl-test-account" data-view="list" data-target="_top"></div>
<script src="https://lokl-web.basharatusman-a.workers.dev/widget.js" async></script>Live embed:
2. button
<div data-lokl-book="lokl-test-account" data-view="button" data-target="_top" data-product="dinner-shared" data-location="toronto"></div>
<script src="https://lokl-web.basharatusman-a.workers.dev/widget.js" async></script>Live embed: