Content Security Policy (CSP) with unsafe-hashes is not working on mozilla firefox

160 views Asked by At

I used the unsafe-hashes for our Content-Security-Policy to override the errors for our html inline attached events, so in Chrome it works fine and scripts like this are working properly:

<a id="myAnchor" onclick="executeMyMethod()"></a>

The problem seems that for mozilla firefox the unsafe-hashes are not implemented as described here https://caniuse.com/?search=unsafe-hashes.

Is there a way to do the same in firefox? Because they suggest to replace with eventListener like this:

document.getElementById("myAnchor").addEventListener("click", executeMyMethod);

But there are a lot of different file and repos to refactor, and it is not viable.

Thanks a lot.

0

There are 0 answers