Nuxt integration
Hi,
I'm trying to integrate Talkyard comments into a Nuxt app but get the following errors:
[Error] SyntaxError: Unexpected token '<'
(anonymous function) (comments-for-conatus-it.talkyard.net:4)
[Error] Refused to load https://c1.ty-cdn.net/-/embedded-comments?embeddingUrl=http://localhost:3000/post/mozart-desire-and-joy because it does not appear in the frame-ancestors directive of the Content Security Policy.
[Error] Refused to load https://c1.ty-cdn.net/-/embedded-editor?embeddingUrl=http://localhost:3000/post/mozart-desire-and-joy because it does not appear in the frame-ancestors directive of the Content Security Policy.
Any ideas ?
Thanks
Paul
- KajMagnus @KajMagnus2019-12-10 15:46:35.629Z
How does your config look? I'm thinking a config variable is wrong:
Should be like this I think:
<script>talkyardServerUrl='https://comments-for-conatus-it.talkyard.net';</script> <script async defer src="https://c1.ty-cdn.net/-/talkyard-comments.min.js"></script>
But looks to me as if in your case,
talkyardServerUrl
is set tohttps://c1.ty-cdn.net...
? (or it's missing?)
However it should be:https://comments-for-conatus ....
.(Only the
<script async defer ...
should use the CDN.) - In reply tomenders⬆:KajMagnus @KajMagnus2019-12-10 15:49:07.979Z
B.t.w. if you get this working, maybe you'd like to post your Nuxt config? I looked a little bit into Nuxt but didn't get that far (had to switch to other job tasks)
- MIn reply tomenders⬆:paul mendrik @menders
Hi KajMagnus !
I managed to get it to work by inserting the code in my nuxt.config.js file under script as follows :
{ talkyardServerUrl: "https://comments-for-conatus-it.talkyard.net" }, async: true, defer: true }Now I will try and change the look a bit !
Thanks for a great platform
Best wishes
Paul