Google Cloud Load balancer URL Rewrite not working

Viewed 3400

I'm trying to setup google cloud load-balancer with HTTPS proxy. The rewrite rules doesn't seem to work. I've attached a screenshot of the same. Any help is appreciated.

enter image description here

Basically I'm trying to access <domain>/api/ping on <domain>/ping. Not sure what the Host rewrite is about as well.

Thanks in advance.

2 Answers

I think the problem is that (at the moment) GCP Load Balancers rewrite is only a "path prefix" rewrite, not a full rewrite, i.e. it prepends the value of the "path prefix rewrite" onto the original request URL.

So I suspect what you have currently is resulting in a request to restoplus-api-backend-services with a URL of /api/ping/ping.

If you set the value of "path prefix rewrite" to /api, you should get a request to your backend of /api/ping.

You should change your path prefix rewrite from "/API/ping" to "/". It will be work If you use a bucket.

Related