I'm working with GCP serving a single page application static files.
for all effects, not found paths, should redirect to index.html and the main script route will display the correct page. our set is:
GCP Bucket -> Load Balancer -> DNS
On the GCP Bucket configuration we set the index.html
file as a 'default file' and if the 'not found'. it works like a charm, all routes are redirected to index.html as planned.
However the returned status is 404 instead of 200. This mess up our metrics and performance metrics.
the question is: How serve files for a not found path withn status 200 instead of 404?
for instance /students/1
should serve index.html
and the main script should display correct page with status 200. But now is serving with status 404.