Skip to content
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

Question: using wasm backend without changing the CSP #8479

Open
ophiryaniv-ts opened this issue Dec 15, 2024 · 1 comment
Open

Question: using wasm backend without changing the CSP #8479

ophiryaniv-ts opened this issue Dec 15, 2024 · 1 comment

Comments

@ophiryaniv-ts
Copy link

Hi,

I’m developing an SDK that uses the TensorFlow.js WASM backend. However, since this is an SDK, I want to avoid asking users to add wasm-unsafe-eval to their Content Security Policy (CSP).

Is there any way to use the WASM backend without requiring wasm-unsafe-eval?

Thanks in advance for your help!

@shmishra99
Copy link
Contributor

Hi @ophiryaniv-ts ,

A Content Security Policy(CSP) issue might arise if you attempt to call external APIs from within a SDK, and these calls are restricted by the SDK. The WASM compiler may try to call dynamic compiler APIs, which can be restricted because of CSP.

Based on my understanding, there's currently no way to use the WASM backend without updating the CSP. This is because it ultimately involves calling dynamic compiler APIs.

Let me know if I've missed anything. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants