Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use custom headers to render RSC / remote components #50

Closed
4 tasks done
lazarv opened this issue Sep 26, 2024 · 2 comments
Closed
4 tasks done

Use custom headers to render RSC / remote components #50

lazarv opened this issue Sep 26, 2024 · 2 comments
Labels
enhancement: pending triage An enhancement pending triage

Comments

@lazarv
Copy link
Owner

lazarv commented Sep 26, 2024

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 #49

Suggested solution

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

  • use React-Server-RSC header to request an RSC payload response
  • use React-Server-Remote header to request an RSC delegation response
  • use React-Server-Standalone header to request standalone type routing logic

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

Possible combinations are:

  • React-Server-RSC with an optional React-Server-Standalone
  • React-Server-Remote with an optional React-Server-Standalone

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

Alternative

No response

Additional context

No response

Validations

@lazarv
Copy link
Owner Author

lazarv commented Dec 19, 2024

This is now superseded by using a URL pattern instead of HTTP headers to select the response type.

@lazarv lazarv closed this as completed Dec 19, 2024
Copy link

This issue has been locked since it has been closed for more than 30 days.

If you have found a concrete bug or regression related to it, please open a new bug report with a reproduction against the latest version of @lazarv/react-server. If you have any other comments you should create a new discussion.

@github-actions github-actions bot locked and limited conversation to collaborators Jan 19, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement: pending triage An enhancement pending triage
Projects
None yet
Development

No branches or pull requests

1 participant