Open jwoertink opened 1 year ago
What I'd love here is if there's a way we can do it on a per channel basis.... No clue how that would work, but if I could say ChatChannel
must be protected by CORS on the same domain, but ApiChannel
has different restrictions as it may be accessed outside of the domain.
https://guides.rubyonrails.org/action_cable_overview.html#allowed-request-origins
The Rails version allows a few CORS settings to be checked, and it rejects connections when they don't match: