Websocket behind Access

Hey, I need to connect to a wss websocket behind a domain that's secured with access? Any way to make websockets not blocked by this? Thanks
5 Replies
mirandaniel
mirandaniel7mo ago
I wouldn't mind not having websockets covered by access, just not sure how do configure that
Chaika
Chaika7mo ago
If your question is how you can use Websockets behind Access: They work just as normal http requests do, if you authenticate with Access you can use Websockets If your question is: How can I poke a hole in my access config to let anyone use websockets but leave the rest protected? You can't filter for just websocket/upgrade requests, but you can create an application with a more specific path: https://developers.cloudflare.com/cloudflare-one/policies/access/app-paths/ and a Bypass/Service Auth Policy allowing everyone. That would only work if the websocket uses one or a few specific paths like /wss which you would create a new self-hosted application in Access to cover
Application paths · Cloudflare Zero Trust docs
Application paths define the URLs protected by an Access policy. When adding a self-hosted web application to Access, you can choose to protect the …
mirandaniel
mirandaniel7mo ago
So if I go to ex. https://example.org, log in and the website then sends requests to wss://example.org, that should work?
Chaika
Chaika7mo ago
Well it working depends on your origin lol, but it shouldn't be blocked by access yea
mirandaniel
mirandaniel7mo ago
It works lmao My nginx config was the issue Thanks a lot, my bad