Content-Security Policy (CSP) Compatible Version¶
We provide a version of the library, which Content-Security Policy (CSP) compatible and also has better Anti-Debugging techniques. However, the disadvantage of this version is that the protection treats most e2e testing tools as injection and blocks the execution of tests
-
Install the csp compatible package in your application (replace
./idlive-face-capture-web-csp-compatible.tgz
with the path to the provided archive file)npm i idlive-face-capture-web-csp-compatible file:./idlive-face-capture-web-csp-compatible.tgz
-
Import csp compatible package instead of production version. Below is an example implementation in Webpack
if (process.env.NODE_ENV === 'test') { import('idlive-face-capture-web'); } else { import('idlive-face-capture-web-csp-compatible'); }