Host a static site single page app in Google Cloud Storage with routes : <p>There are guides and questions all over the place on how to do this, but never really a concrete answer that is satisfactory. Basically, I'm wondering if it's possible to host a static SPA (HTML/CSS/JS) in GCP Cloud Storage. </p>

<p><strong>The main caveat of this is that the SPA has its own routing system (ReactRouter) so I want all paths to be served by index.html.</strong></p>

<p>Most guides will tell you to set the ErrorDocument to <code>index.html</code> instead of <code>404.html</code>. While this is a clever hack, it causes the site's HTTP response code to be 404 which is a disaster for SEO or monitoring tools. So that will work, as long as I can change the response code.</p>

<p>Is there any way to make this work? I have CloudFlare up and running too but from what I can tell there are no ways to trim the path or change the response status from there.</p>
