You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/EXTERNAL_API.md
+19Lines changed: 19 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,6 +12,25 @@ The simulator only processes messages whose `event.origin` exactly matches the d
12
12
When the simulator runs top-level (not in an iframe) the effective allowed origin is `"*"` (any).
13
13
Messages from all other origins are silently discarded.
14
14
15
+
> Important: iframe embedding is controlled by the simulator page's own CSP header, not by the parent page.
16
+
17
+
For local development, the simulator allows embedding from common local test hosts by default:
18
+
-`'self'`
19
+
-`http://localhost:3000`
20
+
-`http://127.0.0.1:3000`
21
+
-`http://localhost:5173`
22
+
-`http://127.0.0.1:5173`
23
+
24
+
If your test application runs on `http://localhost:5173`, the simulator origin must explicitly allow that host in its `frame-ancestors` CSP directive.
25
+
26
+
If you need to allow additional parent origins, set the environment variable `SIMULATOR_ALLOWED_PARENT_ORIGINS` with a comma-separated list of origins before starting the simulator. For example:
0 commit comments