tldraw/apps/dotcom-worker
Steve Ruiz 6d417577be
Prevent iframe embedding for dotcom (except on tldraw.com) (#2947)
This PR fixes a check on whether the dot com multiplayer editor has been
loaded in an iframe.

It tries to keep it working on tldraw.com itself.

### Change Type

- [x] `patch` — Bug fix

### Test Plan

1. Load me in an iframe
2024-02-26 18:30:55 +00:00
..
scripts unbrivate, dot com in (#2475) 2024-01-16 14:38:05 +00:00
src/lib Prevent iframe embedding for dotcom (except on tldraw.com) (#2947) 2024-02-26 18:30:55 +00:00
.gitignore unbrivate, dot com in (#2475) 2024-01-16 14:38:05 +00:00
CHANGELOG.md unbrivate, dot com in (#2475) 2024-01-16 14:38:05 +00:00
package.json bump typescript / api-extractor (#2949) 2024-02-25 11:43:17 +00:00
README.md unbrivate, dot com in (#2475) 2024-01-16 14:38:05 +00:00
tsconfig.json Check tsconfig "references" arrays (#2891) 2024-02-21 13:07:53 +00:00
wrangler.toml unbrivate, dot com in (#2475) 2024-01-16 14:38:05 +00:00

@tldraw/tlsync-worker

Enable database persistence for local dev

The values for env.SUPABASE_KEY and env.SUPABASE_URL are stored in the Cloudflare Workers dashboard for this worker. However we use --local mode for local development, which doesn't read these values from the dashboard.

To workaround this, create a file called .dev.vars under merge-server with the required values (which you can currently find at https://app.supabase.com/project/bfcjbbjqflgfzxhskwct/settings/api). This will be read by wrangler dev --local and used to populate the environment variables.

SUPABASE_URL=<url>
SUPABASE_KEY=<key>