Problems loading on safari: content-security-policy and access control check errors

On Safari on my mac desktop, I am getting these errors when I load discourse:

XMLHttpRequest cannot load due to access control checks.
Unrecognized Content-Security-Policy directive 'worker-src'.

I’m getting these on my own site and also when loading meta. On meta, things seem to still load ok, but on my own site some custom jQuery fails to run when loading categories–I’m guessing from these errors. Everything works fine on chrome–no errors there.

Any ideas or solutions?

If it works fine on Meta and not on your site it is not caused by the same thing.

Can you link to your site? Did you try updating your site to latest?

1 Like

My site is using a custom plug-in for testing right now. It is updated to latest. Not able to link to it at the moment. There’s some Jquery in that plug-in that is not being loaded on my site on safari. Everything loads fine on chrome.

The errors in the inspector in safari happen on both Meta and my site.

UPDATE: Looks like this is related to the Enable Content-Security-Policy setting on the site.

When I disable it, the errors seem to go away (and, sorry for the confusion, looks like the jQuery thing was an unrelated issue). In my desktop safari, the errors show up even with the meta site. So in some way Safari (at least mine, OS 10.15.4) just doesn’t like the content security policy setting. But it looks like performance is probably unaffected.

1 Like