Skip to content

How to use subscriptions with Next.js appDir (I'm using client components) #5488

Closed Answered by sneko
sneko asked this question in Q&A
Discussion options

You must be logged in to vote

I'm a damn idiot. I was too focused on the network section in the browser and didn't see in the console section there was an error about security policy...

Refused to connect to 'ws://localhost:3001/' because it violates the following Content Security Policy directive: "connect-src 'self'".

Just needed to add the exact ws://localhost:3001/ to my connect-src rule (with ending slash), and it works now. Hope it helps 👍

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by sneko
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant