Skip to content

Conversation

hi-ogawa
Copy link
Contributor

@hi-ogawa hi-ogawa commented Aug 12, 2025

Description

Without this, Vite's SharedWorker get blocked by:

Refused to create a worker from 'blob:http://localhost:5173/4600b782-fd0b-4ee7-b8f6-9e0e1156c691' because it violates the following Content Security Policy directive: "script-src 'self' 'nonce-d6241950-ac41-4fff-b52b-6948b203bfbe' 'unsafe-eval'". Note that 'worker-src' was not explicitly set, so 'script-src' is used as a fallback.

client:938 Uncaught (in promise) SecurityError: Failed to construct 'SharedWorker': Access to the script at 'blob:http://localhost:5173/4600b782-fd0b-4ee7-b8f6-9e0e1156c691' is denied by the document's Content Security Policy.
    at waitForSuccessfulPing (client:938:23)
    at handleMessage (client:869:12)

@hi-ogawa hi-ogawa marked this pull request as ready for review August 12, 2025 07:50
@hi-ogawa hi-ogawa merged commit 5b73cbe into main Aug 12, 2025
21 checks passed
@hi-ogawa hi-ogawa deleted the 08-12-chore_rsc_fix_csp_for_vite_server_ping_sharedworker branch August 12, 2025 07:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant