I'm reading Pages' docs and I can't find a way to make the server return a proper 404 http code in a
I'm reading Pages' docs and I can't find a way to make the server return a proper 404 http code in an asset that doesn't exist is requested.
According to https://developers.cloudflare.com/pages/configuration/serving-pages/#not-found-behavior I can create a custom 404.html that can display a "404 not found" message to the user, but the actual http code is still 200.
And according to https://developers.cloudflare.com/pages/configuration/serving-pages/#single-page-application-spa-rendering if I don't provide any 404.html, cloudflare will return the index.html for all requests that don't match any file.
So... how can I make Pages return a real 404 http code?
According to https://developers.cloudflare.com/pages/configuration/serving-pages/#not-found-behavior I can create a custom 404.html that can display a "404 not found" message to the user, but the actual http code is still 200.
And according to https://developers.cloudflare.com/pages/configuration/serving-pages/#single-page-application-spa-rendering if I don't provide any 404.html, cloudflare will return the index.html for all requests that don't match any file.
So... how can I make Pages return a real 404 http code?


