Is your Action Cable connection secure when using Turbo?

When Turbo 7 and its Rails integration turbo-rails dropped in late 2020, it became easier than ever to use Action Cable. With just a few lines of code, you could broadcast updates to the client over WebSockets and build all kinds of real-time interactivity with ease. This ease does come with a trade-off. There’s a security pitfall that’s all too easy to fall into. By default, WebSocket connections…