Reputation: 602
I have an API under cloud run. My cloud run service is behind a Load Balancer.
I'd like to open a socket connection from my front end app to my API (wss protocol).
When I use the cloud run service url it works but when I use my custom domain name I receive an error "undefined" and the connection is closed immediately. There is no log, making it very difficult for me to debug.
As I want to limit my ingress permission to Allow internal traffic and traffic from Cloud Load Balancing I can't use the cloud run service url.
On my load balancer my front end is using HTTPS protocol.
I do not understand what is blocking my socket connection. Please ask for any details or further investigation. As I do not know where to begin my investigation I am having a hard time making a great post.
Update
If I connect using the cloud run url under allow all, it works, as I was saying. But I noticed another behavior. If I make a first connection using the cloud run url and then, try to connect using my custom domain url on the same browser. It works, whereas if I do the same operation on another browser or on a private window it fails with a 302 status code.
Update
So it appears that dis-activating IAP allow my front end to open a websocket connection to my API..
now I am trying to find a way to do the same but with IAP activated..
Thanks
Upvotes: 0
Views: 860