I have a Vaadin (24.2.2) Spring Boot (3.1.5) app deployed on Google Cloud Run, which is set to serve content on a custom context path "/pbuilder". I've put a Google Cloud Load Balancer in front, and I want to route traffic to paths "/pbuilder/" and "/pbuilder/*". However, the load balancer forwards requests for Vaadin static content (e.g., "/VAADIN/...") without the "/pbuilder" prefix to the Cloud Run service, resulting in 404 errors because my app expects the "/pbuilder" prefix.

How can I adjust the GCP Load Balancer's path matchers to automatically include the "/pbuilder" context path for all incoming requests, especially for Vaadin static content? Or how can i do this the in Vaadin app?

What I've tried:

Setting server.servlet.context-path=/pbuilder in my Spring Boot application. Defining path rules in the load balancer for "/pbuilder/" and "/pbuilder/*". The load balancer doesn't seem to rewrite the path to include the context path for static content requests. Is there a way to configure the path matchers or another method to achieve this on GCP?

0

There are 0 best solutions below