Skip to content

Commit

Permalink
Add wasm-unsafe-eval
Browse files Browse the repository at this point in the history
For cases that WebAssembly execution is required but unsafe-eval is too permissive.

https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/script-src#unsafe_webassembly_execution
  • Loading branch information
yoavbls authored Dec 19, 2024
1 parent 6e2cbc6 commit 9d6167e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/csp.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ type HttpDelineators = typeof httpDelineators[number];
type UriPath = `${HttpDelineators}${string}`

// Base Source Directives
export const baseSources = ['self', 'unsafe-eval', 'unsafe-hashes', 'unsafe-inline', 'none', '*'] as const;
export const baseSources = ['self', 'unsafe-eval', 'wasm-unsafe-eval', 'unsafe-hashes', 'unsafe-inline', 'none', '*'] as const;
type BaseSources = typeof baseSources[number]

// Combined all source directives
Expand Down

0 comments on commit 9d6167e

Please # to comment.