I have been running my astro SSR site on Netlify with great success. However, I recently encountered an issue when testing it on older iPhone models like the iPhone 6 and earlier. It seems that all script executions halt, rendering the site non-interactive.
Upon inspecting Safari Error logs from the iPhone 5SE Simulator, I found the following errors:
[Error] SyntaxError: Unexpected token '.'
[Error] The source list for Content Security Policy directive 'script-src' contains an invalid source: ''strict-dynamic''. It will be ignored.
[Error] The source list for Content Security Policy directive 'script-src' contains an invalid source: ''strict-dynamic''. It will be ignored. (x2)
[Error] Unhandled Promise Rejection: SyntaxError: Unexpected token '?'
[Error] Unhandled Promise Rejection: SyntaxError: Unexpected token '?'
https://i.sstatic.net/TIyjN.png
https://i.sstatic.net/yEZnh.png
I am uncertain about how to resolve this issue. Any assistance would be greatly appreciated.
PS: My setup includes using Svelte to build astro islands and Google reCAPTCHA v3 on the problematic page. Interestingly, everything works perfectly in my development environment.