0
votes

Google Cloud Storage provides an option to configure a 404 HTML page to serve when a request is made for a non-existent object.

Relevant Google docs - https://cloud.google.com/storage/docs/gsutil/commands/web

Is there any way I can attach custom response headers on this plain 404 response?

My intent is to figure out what URL/object key resulted in the 404 response.

1

1 Answers

0
votes

From what I see it only redirects to that 404.html page you can customize. So to display the missing URL you would have to get the reference from your own request and send it (as GET for example) to the error page. But that depends on how you make that request.