Skip to content

Start - allow custom status code on initial SSR request #3738

Closed
@carloitaben

Description

@carloitaben

Which project does this relate to?

Start

Describe the bug

Hello! I’m trying to set a custom status code for a server-side rendered page. On React Router 7, this can be achieved using the data function. Can Start add support for something similar? Currently, there is no way to set a custom status code on the initial SSR request.

Discussion on Discord:
https://discord.com/channels/719702312431386674/1349018191585611897

Related discussion on Next.js:
vercel/next.js#53225

I've added an example of the behavior of React Router 7 below

Your Example Website or App

https://github.com/carloitaben/test-rr7-custom-status-code/blob/main/app/routes/loader.tsx

Steps to Reproduce the Bug or Issue


Expected behavior

As a user, I expected to be able to customize the document response status code.

Screenshots or Videos

No response

Platform

  • OS: ---
  • Browser: ---
  • Version: 1.114.13

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions