mirror of
https://github.com/tiennm99/rplace.git
synced 2026-10-11 03:13:48 +00:00
docs: purge remaining Upstash references and sync to DO storage
Drop /admin/migrate-from-upstash from public API docs, replace deprecated UPSTASH_* env vars with ALLOWED_ORIGINS/ENVIRONMENT, update Worker conventions to reflect DO bindings (env.CANVAS_ROOM) instead of Redis client patterns, and rewrite system-architecture security/data-flow sections to cover cookie+IP identity, transactionSync atomicity, WS Origin allowlist, per-identity WS cap, and broadcast sequence numbers.
This commit is contained in:
1 parent
4f02d30393
commit
9f50237a3c
5 files changed
+63
-86
No files matched your search
@@ -26,10 +26,11 @@ src/
|
||||
|
||||
### Worker (src/worker.js, src/lib/*)
|
||||
|
||||
- Functions receive `env` parameter for Cloudflare bindings (Redis credentials, DO bindings)
|
||||
- Functions receive `env` parameter for Cloudflare bindings (DO bindings, vars)
|
||||
- No global state — Workers are stateless between requests
|
||||
- Use `@upstash/redis/cloudflare` (REST-based, not TCP)
|
||||
- Bitfield operations use builder pattern: `redis.bitfield(key).set().exec()`
|
||||
- Durable Object access via `env.CANVAS_ROOM.get(env.CANVAS_ROOM.idFromName('main'))`
|
||||
- Identity flows through `resolveIdentity(request, env)` (cookie-first, IP fallback)
|
||||
- Edge handlers validate input before forwarding to the DO; the DO re-validates at the trust boundary
|
||||
|
||||
### Client (src/client/*)
|
||||
|
||||
|
||||
Reference in new issue
Block a user