Replace crypto.randomUUID with fallback for HTTP contexts
crypto.randomUUID() requires secure context (HTTPS). Use Date.now + Math.random fallback for session ID generation. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
e041c6d9e8
commit
a838fcc7a8
@ -3,7 +3,7 @@
|
||||
|
||||
let chatSessionId = sessionStorage.getItem('chat_session');
|
||||
if (!chatSessionId) {
|
||||
chatSessionId = crypto.randomUUID();
|
||||
chatSessionId = 'sess-' + Date.now().toString(36) + '-' + Math.random().toString(36).slice(2, 10);
|
||||
sessionStorage.setItem('chat_session', chatSessionId);
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user