docs(browser-files): dispose the file runtime on logout or account switch (02-03)
The runtime does not know the session, so File refs, preview leases and downloads of the previous user outlived a logout. Section 3.5 and the recipe lifecycle now say to dispose it, via a scope reset participant if needed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
9a56741357
commit
c8e4794860
@@ -355,6 +355,14 @@ digest 또는 별도 검토된 streaming hash adapter를 사용한다.
|
||||
모든 active lease를 즉시 revoke한다.
|
||||
- URL을 global state, IndexedDB, query cache, log, analytics에 보관하지 않는다.
|
||||
- Service Worker에서 object URL을 사용하지 않는다.
|
||||
- 로그아웃·계정 전환에서는 runtime 전체를 dispose한다. browser file runtime은
|
||||
세션을 모른다(`src/adapters/browser-files/create-browser-file-runtime.ts:93`).
|
||||
`runtime.dispose()`(`:177-185`)가 이전 사용자가 고른 File 참조, preview lease,
|
||||
진행 중 download(`download-delivery-adapter.ts:385-391`)를 한 번에 닫는다.
|
||||
runtime을 route·feature보다 오래 사는 곳에서 만들었다면 server-state scope
|
||||
reset participant(`src/adapters/query-cache/server-state-scope-runtime.ts:19`,
|
||||
등록 예 `src/bootstrap/runtime-adapters.ts:410-416`)로 `dispose()`를 등록하고
|
||||
다음 세대에서 새 runtime을 만든다. dispose한 runtime은 다시 쓸 수 없다.
|
||||
- SVG, HTML, untrusted PDF 같은 active content를 same-origin object URL iframe에
|
||||
직접 preview하지 않는다. 별도 격리 origin 또는 안전한 decode/re-encode 결과,
|
||||
아니면 attachment-only 정책을 사용한다.
|
||||
|
||||
Reference in New Issue
Block a user