Refused to connect
in3166 opened this issue · 2 comments
Hi
Your tutorial was so helpful to me. Thank you!
I'm trying to apply AJAX
But I have a problem
like this:
Refused to connect to 'https://script.google.com/macros/' because it violates the following Content Security Policy directive: "default-src 'self'". Note that 'connect-src' was not explicitly set, so 'default-src' is used as a fallback.
What should i do..?
Glad to hear it's been helpful!
Do you have an example you could share with us where it's failing?
For example, this Codepen has the form embedded and a similar example would make seeing what's wrong far easier. I could only guess what the problem is otherwise which doesn't sound super helpful for you!
Thank you for your answer!
I solved this problem.
I made the server using express.
In my server, I used a helmet package that helps user secure users' Express apps by setting various HTTP headers
And it makes a CSP problem.
So I set up CSP settings to allow Google scripts.
And It works!