-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Mark route as "ssr only" #2722
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
Comments
One thing you might be able to do right now, without waiting for a new feature to be implemented, would be to have your
And then your Alternately, so as to not have a different error page for everything, redirect to |
We might be able to solve this with routing hooks when we implement those (#552) |
#909 isn't going to be implemented. Now that we have page endpoints, I think the |
Describe the problem
It's currently possible to ensure that a route is server rendered by adding the
rel="external"
attribute to any links to it. It would be convenient to configure this once in the page that should always be server rendered. A use-case for this is a page that needs to set a cookie (e.g. once #909 is implemented). In my case I have a/login
route that does this (sets a cookie and redirects to an OpenID Connect provider). At the moment I implement this as an endpoint, but this isn't ideal as if something goes wrong it would be difficult to ditch the redirect and render a page that explains the error to the user.Describe the proposed solution
I'm not too sure how it would be implemented (happy to help if I can, but I think #909 might be more tractable for a beginner like me). There's another problem I've come across that endpoints are not server rendered by default (I've also used
rel="external"
to work around this issue - seems like the solution to this would be similar.Alternatives considered
I can use an endpoint to work around this limitation (or perhaps hooks) but it won't handle errors as well (or be as convenient).
Importance
would make my life easier
Additional Information
No response
The text was updated successfully, but these errors were encountered: