fgnass / spin.js

A spinning activity indicator
http://spin.js.org
MIT License
9.3k stars 1.02k forks source link

Is spin.min.js CSP compatible? #394

Closed bhaktisukhadiya closed 1 month ago

bhaktisukhadiya commented 1 month ago

I am importing the spin.min.js V2.0.1 library file in my AngularJS with C# application. The problem arises when I add the following CSP line to my project:

<add name="Content-Security-Policy" value="script-src 'self' http: https: 'unsafe-inline' 'unsafe-eval';"/>

I need to remove unsafe-eval from the policy. Therefore, I need to check whether the library file is CSP compatible or not, specifically checking if setTimeout, is used without causing errors in the console.

theodorejb commented 1 month ago

Version 2.x is very old and not supported. Can you try using the latest version?

bhaktisukhadiya commented 1 month ago

Version 2.x is very old and not supported. Can you try using the latest version? this version is CSP compatible or not??

theodorejb commented 1 month ago

Yes, the latest version of spin.js is CSP compatible.