While using the MS chat bot - directline channel in SharePoint pages, i'm getting a error :
Error message:
webchat-es5.js:1 Refused to connect to 'wss://directline.botframework.com/v3/directline/conversations/DdAvR7sMQ8zAXx0oltBdoC-h/stream?' because it violates the following Content Security Policy directive: "default-src https: data: 'unsafe-inline' 'unsafe-eval'". Note that 'connect-src' was not explicitly set, so 'default-src' is used as a fallback.
I tried to add the directline webchat in a mormal HTML page,its working as expected. so something is stopping it to run inside sharepoint
<script>
window.WebChat.renderWebChat(
{
directLine: window.WebChat.createDirectLine({
token: 'my token here'
}),
userID: 'my name'
},
document.getElementById('webchat')
);
</script>
I want my code should run inside the SharePoint page
About my SharePoint page: Environment: SP 206 on-premise code added inside a CE webpart i used the local reference as well as CDN reference of webchat.js / webchar-e5.js / botchat.js.