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
feat(copilot): support ?url= to load a specific editor URL
Add a ?url= query param whose value becomes the editor iframe src
verbatim and the postMessage bridge target origin, so a fork can open
any document / tenant / editor params instead of the bundled demo forms.
Restrict it to the configured base-domain host family: third-party
origins are rejected so an arbitrary site can't be framed with the
iframe's clipboard permissions or wired to the bridge. Absent, malformed,
or off-domain values fall back to the default demo-form behaviour.
Also hoist the client-env block above the route helpers so the new
validator can read BASE_DOMAIN_URL, and fix requiresUserUpload to stay
false when ?url= supplies the document.
Copy file name to clipboardExpand all lines: copilot/README.md
+12Lines changed: 12 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -119,6 +119,18 @@ Two providers are supported on the shared-key path:
119
119
120
120
See [`.env.example`](./.env.example) for the JSON shape, the per-share rate-limit options, and the portable base64 one-liner for hosts that mangle embedded quotes (DigitalOcean App Platform, Render, fly.io). Then visit `http://localhost:3001/?share=<id>` and you're set.
121
121
122
+
### Load a specific document via `?url=`
123
+
124
+
To open a specific editor URL instead of the bundled demo forms, append `?url=<editor-url>`. The value is used verbatim as the editor iframe `src`, so pass a full SimplePDF editor URL with whatever it needs (`?open=`, a locale prefix, signature-request params, a different tenant subdomain):
URL-encode the value whenever it carries its own query string (e.g. `?open=`), otherwise the nested params get parsed as part of the page URL and dropped.
131
+
132
+
The value must be an absolute `http(s)` URL on your configured base-domain family (`*.simplepdf.com` by default, or whatever host `VITE_SIMPLEPDF_BASE_DOMAIN` resolves to). Third-party origins are rejected on purpose: the iframe is granted clipboard access and is wired to the `postMessage` bridge, so framing an arbitrary site would hand it both. A malformed or off-domain `?url=` silently falls back to the default demo form. `?url=` combines with `?lang=` and `?share=`; when set, it wins for what the editor loads.
133
+
122
134
### Ship it on your own domain
123
135
124
136
Running SimplePDF Copilot anywhere other than `localhost:3001` or the hosted demo URL requires a SimplePDF [Pro](https://simplepdf.com/pricing) account (or higher) so that:
0 commit comments