-
Hi Community members, I want to ask about my query in which I've been struggling with since a few days back. Please help me. Any help will be appreciated. I built my Chat App in a custom application and I'm trying to integrate this app with my frontend where I encounter an error : **websocket.js:44 Refused to connect to 'wss://my-node-app-ayn7szpppq-uc.a.run.app/socket.io/?EIO=4&transport=websocket' because it violates the following Content Security Policy directive: "connect-src 'self' app.launchdarkly.com clientstream.launchdarkly.com events.launchdarkly.com app.getsentry.com ** |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi @nikhilkni, // custom-application-config.mjs
const config = {
...,
headers: {
csp: {
'connect-src': ['wss:'],
},
}; For further details and information, you can refer to the following resource: |
Beta Was this translation helpful? Give feedback.
Hi @nikhilkni,
Thank you for getting in touch.
You'd probably need to add
wss:
to theconnect-src
directive of the Content Security Policy like so:For further details and information, you can refer to the following resource:
https://docs.commercetools.com/custom-applications/api-reference/application-config#headerscsp