Making Google Cloud Run compatible with Cloudflare

Hi,

I’ve been trying to setup/change my service provider from heroku to Google cloud run. Now the issue is that ERR_TOO_MANY_REDIRECTS. I know this is because SSL redirection loop so in the case of heroku I had removed the SSL certificates and it was working fine. But now while I’m trying to migrate to GCP, there is no option to remove SSL in Google cloud run so I’m stuck in the loop. Tried a lot to search for a solution but didn’t find any.

So want to know that is there any way to make Cloudflare work with google cloud run without compromising on the security of the website as the main reason for using CF was that I was getting a lot of DDOS attacks on the website and the attacker was able to take down my website(unfortunately even after using CF he was able to take it down).

If it’s an SSL redirect loop, make sure your GCP has a proper certificate and your SSL/TLS mode here is set to Full (Strict).

1 Like

I dont think there is any option to see or change Google Cloud Run certificates.
Is there any tutorial of properly configuring GCR with CF?

The rule of thumb is that a site needs to be functional on its own before you add it to Cloudflare. This includes HTTPS.

It sounds like you have SSL, which is important. So I don’t understand why there’s an SSL redirect loop if your SSL/TLS mode here is set to Full (Strict).

Thanks, looks like it worked. Now facing another issue. Now I’ve put load balancer over GCR and its running on HTTP & I’ve my frontend running on vercel(which uses HTTPS). So when I make CF SSL flexible my GCR services run and frontend domain doesn’t and when I make it full (strict) my GCR services works but my frontend vercel domain doesn’t.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.