Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I change the actioncable default path?

I have an ecommerce website that sells cables, and as such I'd like to use /cable, /cables etc in my base routes.

Unfortunately activecable uses the /cable path by default. Is there any way I can change this?

So far I've tried changing (to no avail) in my /config/application.rb:

config.action_cable.url = "ws://www.example.com/actioncable"

Any thoughts would be much appreciated!

like image 615
Marcus Schappi Avatar asked Mar 07 '26 22:03

Marcus Schappi


1 Answers

In your routes.rb :

Add this line:

mount ActionCable.server => '/your_route_for_action_cable'
like image 75
Saqib Shahzad Avatar answered Mar 09 '26 13:03

Saqib Shahzad



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!