Trying to test out Turbo:StreamsChannel
Opened this issue · 1 comments
epugh commented
I am trying to verify that TurboStreams works... I'm having luck when I go direct to Rails from web browser, but with HAProxy having issues.
I wanted to test out connectivity using acli
but always get a rejection:
./acli -u http://localhost:3000/cable -c Turbo::StreamsChannel
Connected to Action Cable at ws://localhost:3000/cable
Subscription rejected
I'm guessing something about signatures. Anyway to avoid this?
palkan commented
I'm guessing something about signatures. Anyway to avoid this?
You need to provide a signed_stream_name
parameter; currently, you don't have one, so the subscription attempt is rejected.
It should be something like:
./acli -u http://localhost:3000/cable \
-c Turbo::StreamsChannel \
--channel-params="signed_stream_name:${STREAM}" \
Where STREAM
is a signed stream name (you can obtain it form the <turbo-cable-stream-source>
HTML element).