plugin installed but has error
sharkfin009 opened this issue · 3 comments
Bug report
I have an unresponsive plugin, and an error in the console
A clear and concise description of what the bug is.
Steps to reproduce the behavior
1 install plugin
go to menu item
try to use plugin
Expected behavior
A clear and concise description of what you expected to happen.
To have a responsive application
Screenshots
If applicable, add screenshots to help explain your problem.
Code snippets
js console error:
[request].0ccf0344.chunk.js:248 Refused to load the script 'https://editor.unlayer.com/embed.js?2' because it violates the following Content Security Policy directive: "script-src 'self'". Note that 'script-src-elem' was not explicitly set, so 'script-src' is used as a fallback.
Describe the bug
If applicable, add code samples to help explain your problem.
System
- Node.js version:
- NPM version:
- Strapi version:
- Plugin version:
- Database:
- Operating system:
Additional context
Add any other context about the problem here.
Thank you!! This is your first issue on this repo
Hey @sharkfin009 ,
You may need to configure your middleware in Strapi to get rid of this error. It was also stated in the docs.
// ...
"strapi::security",
{
name: "strapi::security",
config: {
contentSecurityPolicy: {
directives: {
"script-src": ["'self'", "editor.unlayer.com"],
"frame-src": ["'self'", "editor.unlayer.com"],
"img-src": [
"'self'",
"data:",
"cdn.jsdelivr.net",
"strapi.io",
"s3.amazonaws.com",
],
},
},
},
},
// ...
Check hee for details Add Unlayer to CSP