lazarv / react-server

The easiest way to build React apps with server-side rendering
https://react-server.dev
MIT License
121 stars 6 forks source link

Use custom headers to render RSC / remote components #50

Open lazarv opened 1 month ago

lazarv commented 1 month ago

Description

The rendering logic is using the standard Accept HTTP header to drive the response type and caching used by the framework. This is not ideal for proxies and caching. See some additional information at https://github.com/lazarv/react-server/pull/49

Suggested solution

Use custom HTTP headers to drive the rendering logic and to choose the response type and framework level caching type.

Existence of the above HTTP headers will drive the rendering logic.

Possible combinations are:

React-Server-RSC and React-Server-Remote can't be used in the same request!

Alternative

No response

Additional context

No response

Validations