Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Hosting react app storage bucket

I'm setting up React app frontend with Google Cloud Storage and Loadbalancer. During build, index.html and javascript file is uploaded into cloud storage. Loadbalancer points to backend bucket. I can now access react app if I go to http://(loadbalancerip)/index.html

 

I want to react to handle all routing, and I also want our user to access site via arbitrary path (eg http://(loadbalancerip)/user/details). Is there a way to achieve this with GCP load balancer? Basically I want it to always serve "index.html" regardless of path user is accessing.

0 2 1,852
2 REPLIES 2

As shown on this Stack Overflow answer, there is currently a Feature Request about this matter.

About Feature Requests:

Feature requests

You can also request and vote for new Google Cloud features. Unlike issue reports, we don't immediately triage new feature requests. Instead, we wait for a feature to have a handful of stars and, hopefully, comments from several users about how the feature would be useful. So, when it comes to feature requests, it's especially important to vote for an existing request (if one exists) instead of making a duplicate.

See also:

Hi Cristianrm,

Is there anything could be done in yaml file level?