I have a Node/React app and get this error when I refresh the page in my production build, for all routes apart from "/", and a blank page is shown.
Refused to execute inline script because it violates the following Content Security Policy directive: "script-src 'self'". Either the 'unsafe-inline' keyword, a hash ('sha256-eE1k/Cs1U0Li9/ihPPQ7jKIGDvR8fYw65VJw+txfifw='), or a nonce ('nonce-...') is required to enable inline execution.
Page refreshing functions normally in my local build.
I have seen a similar issue here: Inline script because it violates the following Content Security Policy directive: "script-src 'self'" and so have tried the INLINE_RUNTIME_CHUNK=false, which made no difference, and when I tried to add the cross-env, I got a CORS error. I don't really understand why cross-env helps or why it could be causing my requests to be blocked by CORS.
Does anyone have any advice? Or let me know if you need more information about my setup.
Thanks!