Issues trying to implement simple analytics on screwfast #298
Replies: 2 comments
-
Hi @brandatastudio! Your current Content-Security-Policy header in
P.S: You may also remove |
Beta Was this translation helpful? Give feedback.
-
this did the trick, thank you so much for your help. |
Beta Was this translation helpful? Give feedback.
-
Hello! i'm having some trouble with the content security policy when implementing simple analytics into my screwfast website.
My current astrowebsite is hosted and deployed in vercel, you can see it at this domain: mathforbusiness.com
I get currently the following error:
I tried modifying the vercel.json file by adding the following lines, as suggested by simple analytics documentation https://docs.simpleanalytics.com/csp
Content-Security-Policy: script-src 'self' 'unsafe-inline' https://scripts.simpleanalyticscdn.com; connect-src 'self' https://queue.simpleanalyticscdn.com; img-src 'self' https://queue.simpleanalyticscdn.com https://simpleanalyticsbadges.com;
But i still get the same error, possibly because lines already in the json file are the ones causing the issue.
It's my first time deploying a website on astro , and have very litle experience developing front end in general, i'm concerned of modifying further the content security policy and making my website vulnerable. Is there an elegant way to solve this issue? Is there any tested way anyone has implemented simple analytics on a screwfast template website?
Here is my vercel.json file wit the content security policy, in case anyone has any ideas.
vercel.json
Beta Was this translation helpful? Give feedback.
All reactions