Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trying to test out Turbo:StreamsChannel #9

Open
epugh opened this issue May 21, 2024 · 1 comment
Open

Trying to test out Turbo:StreamsChannel #9

epugh opened this issue May 21, 2024 · 1 comment

Comments

@epugh
Copy link

epugh commented May 21, 2024

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
Copy link
Owner

palkan commented May 21, 2024

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants