ol2 icon indicating copy to clipboard operation
ol2 copied to clipboard

Drop use of 'new window.Function' to satisfy Content-Security-Policy

Open dracos opened this issue 9 years ago • 0 comments

A Content-Security-Policy header (without unsafe-eval) will block any use of new Function, even one that's empty. I think the offending line at https://github.com/openlayers/ol2/blob/75716beaacc01955f05708c03438b588fc8db55d/lib/OpenLayers/Request/XMLHttpRequest.js#L391 can be safely set to null instead.

dracos avatar Aug 16 '16 16:08 dracos