-
Notifications
You must be signed in to change notification settings - Fork 962
fix(desktop): WASM not actually being used by xterm fix #383
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -9,13 +9,13 @@ | |
| https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP | ||
|
|
||
| - default-src 'self': Only allow resources from same origin | ||
| - script-src 'self' https://*.posthog.com: Allow scripts from same origin + PostHog | ||
| - script-src 'self' 'wasm-unsafe-eval' https://*.posthog.com: Allow scripts from same origin + WebAssembly (for xterm ImageAddon) + PostHog | ||
| - style-src 'self' 'unsafe-inline': Allow styles from same origin + inline (needed for CSS-in-JS) | ||
| - connect-src 'self' ws: wss: https://*.posthog.com: Allow WebSocket connections for HMR + PostHog analytics | ||
| - img-src 'self' data:: Allow images from same origin + data URIs | ||
| - img-src 'self' data: https://*.public.blob.vercel-storage.com: Allow images from same origin + data URIs + Vercel blob storage (avatars) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good fix for data URI syntax, but verify Vercel blob storage scope. The correction from However, adding |
||
| - font-src 'self': Allow fonts from same origin | ||
| --> | ||
| <meta http-equiv="Content-Security-Policy" content="default-src 'self'; script-src 'self' https://*.posthog.com; style-src 'self' 'unsafe-inline'; connect-src 'self' ws: wss: https://*.posthog.com; img-src 'self' data:; font-src 'self';" /> | ||
| <meta http-equiv="Content-Security-Policy" content="default-src 'self'; script-src 'self' 'wasm-unsafe-eval' https://*.posthog.com; style-src 'self' 'unsafe-inline'; connect-src 'self' ws: wss: https://*.posthog.com; img-src 'self' data: https://*.public.blob.vercel-storage.com; font-src 'self';" /> | ||
| </head> | ||
|
|
||
| <body> | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove incorrect claim that xterm ImageAddon requires WebAssembly.
The comment states that
'wasm-unsafe-eval'is needed for xterm ImageAddon, but the addon processes images entirely in JavaScript and does not require WebAssembly. The encoder is documented as "not yet wasm optimized," confirming WASM is not currently used. Update the comment to reflect that this CSP directive is not needed for the ImageAddon specifically.🤖 Prompt for AI Agents