1

I'm trying to configure a Google Cloud load balancer to forward API request to a backend service and all other requests to a storage bucket. However, all requests are directed to the storage bucket. This seems to be because I can't delete the entry in Host and path rules with host * and path /*.

The current setting for Host and path rules looks as follows: Current "Host and path rules" setting

To me this looks like all requests will match against host * and path /* and be forwarded to bucket-cmd-com (before matching against the entries for web-api-backend), and this is exactly what I experience (a request against e.g. /calc/unfinished/count results in a Google 404 page).

On the Load balancer details page, if I click EDIT, go to Host and path rules and click the X to the right of the entry for host=*, path=/*, the entry disappears from the list. However, after I save this (by clicking Update) the entry is still there.

How do I either delete this "match all" entry for bucket-cmd-com or make it work in some other way?

runeks
  • 131
  • 1
  • 6

1 Answers1

0

According to the doc it states:

"A newly created URL map matches only one path, the default one (/*). This default path matcher is created automatically. All traffic that does not match a manually created path matcher or host rule is sent to the URL map default backend service."

Therefore, as it is a default configuration can not be removed. Per my understanding looks like the settings host=*, and path=/* are configured during load balancer creation, similar to the image here.

I think the best way to achieve this configuration would be specifying as needed during Load Balancer configuration the Host and path rules based on your application needs.

Additional information can be found on this documentation.

cochitoo
  • 11
  • 3