mirror of
https://github.com/langgenius/dify.git
synced 2026-05-03 00:48:04 +08:00
fix(csp): add wasm-unsafe-eval to enable WebAssembly execution
SQLite preview feature requires WebAssembly to run wa-sqlite, but CSP policy was blocking WebAssembly.instantiate() without wasm-unsafe-eval directive in script-src.
This commit is contained in:
@ -34,7 +34,7 @@ export function proxy(request: NextRequest) {
|
||||
const cspHeader = `
|
||||
default-src 'self' ${scheme_source} ${csp} ${whiteList};
|
||||
connect-src 'self' ${scheme_source} ${csp} ${whiteList};
|
||||
script-src 'self' ${scheme_source} ${csp} ${whiteList};
|
||||
script-src 'self' 'wasm-unsafe-eval' ${scheme_source} ${csp} ${whiteList};
|
||||
style-src 'self' 'unsafe-inline' ${scheme_source} ${whiteList};
|
||||
worker-src 'self' ${scheme_source} ${csp} ${whiteList};
|
||||
media-src 'self' ${scheme_source} ${csp} ${whiteList};
|
||||
|
||||
Reference in New Issue
Block a user