Setting status-code from loader
Has anyone found a good way to set the response status code from a loader during SSR?
I need to set the status code to
Alternative approaches:
1. Throw the result of
2. Using middlewares somehow propagating status code through headers and similar, and map the response object....
3. ???
setResponseStatus does nothing. I need to set the status code to
404, but without throwing an error in the loader. Ideally, I would like to render the page as usual using the loader's result, but use the status code to signal indexers, etc., that the site is "expired".Alternative approaches:
1. Throw the result of
notFound() and fetch the data from the API on the client (outside of the loader).2. Using middlewares somehow propagating status code through headers and similar, and map the response object....
3. ???