https://discord.gg/botpress logo
Content-Security-Policy (CSP) Requirements Documen...
# 👀feature-requests
m
When adding botpress to a site that enforces Content-Security-Policy (CSP), botpress will be blocked. I could not find documentation what to change, so found out for myself: it worked when changing the header to 'default-src 'self';script-src cdn.botpress.cloud files.bpcontent.cloud;connect-src webchat.botpress.cloud;img-src 'self' files.bpcontent.cloud;style-src fonts.googleapis.com 'unsafe-inline'; media-src 'self' data:'. It would be nice if this is a stable header, and if this is documented. Reproduction: You can check the issue using a local index.html (attached, add your own botpress includes). Install 'serve' (npm install serve), put the serve.json and index.html in a folder, and in that folder run ' serve -l 8000'. In a browser go to localhost:8000. If you limit the CSP header in the json file to " default-src 'self' ", in the devtools you will see that traffic to botpress is blocked or the console logs errors. https://cdn.discordapp.com/attachments/1433049277994762343/1433049278137241630/serve.json?ex=690346a4&is=6901f524&hm=9ec11594e0b02ca42eac3d629dcce0e32e5a5400534729619baf7ffc5a66ec39& https://cdn.discordapp.com/attachments/1433049277994762343/1433049278435299418/index.html?ex=690346a4&is=6901f524&hm=b0a11af58c9e049a1b39c36d1bba444d7002a6655a33bcebf1c3f7da23f7a610&
7 Views