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-document-capture-web-csp-compatible.tgzwith the path to the provided archive file)npm i idlive-document-capture-web-csp-compatible file:./idlive-document-capture-web-csp-compatible.tgz -
Copy the
idlive-capturefolder to your public directorycp -r ./node_modules/idlive-document-capture-web-csp-compatible/idlive-capture ./path/to/your/public/dir -
Import the csp compatible package instead of the production version
import('idlive-document-capture-web-csp-compatible'); -
Additionally load the script from the
idlive-capturefolder without minification or any modifications. The following options are possible depending on the detector version:- Default Document Detector
<script src="/idlive-capture/document.js"></script>- Custom Detector
<script src="/idlive-capture/document-no-detector.js"></script> -
By default, the library will fetch files from the URL
/idlive-capture. You can change this using thesdk_pathattribute<idlive-document-capture sdk_path="/assets"></idlive-document-capture>