MacOS – Change or disable Content Security Policy in Safari

catalinamacossafari

Trying to make my own userscripts, running them in the browser console and connect to ws://localhost:* servers, but the Content Security Policy always ruins my day.

How do I disable it in Safari?

Or change them to include ws://localhost:* ?

Best Answer

Impossible in Safari, I had to install Firefox Developer Edition and change it there:

by disabling security.csp.enable in the about:config menu

Which you access of course by typing about:config into the URL bar.