Best way to handle redirecting non-authorized users while still allowing cache components #86550
Unanswered
brad-decker
asked this question in
Help
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Summary
Our platform has some private auctions on it (less than 1% of auctions are private). To protect these pages from being viewed by the public, I have a guard that runs at the page level (note this code used to exist within the page component itself, but as part of working towards refactoring to use cache components, I have extracted it to a helper so that I can await params inside of this helper)
I need this code to run and redirect before any data about the page, even Metadata, is returned. The private auction details cannot be leaked to the public or indexed by search engines.
However, it's a let-down that because of the <1% I cannot render the majority of our auctions using cached components (or maybe I'm just not understanding the paradigm fully). Has anyone done something similar or have tips for me?
Additional information
No response
Example
No response
Beta Was this translation helpful? Give feedback.
All reactions