Closed xstevenyung closed 2 years ago
The obstacle here is that with streaming the response is already sent out after the page component's frontmatter runs. If you were to throw in a component inside of the page component it would be too late. I'm not sure how we can address this problem.
I'm not familiar with the whole streaming response flow, but I guess it make sense.
I saw a bunch of middleware RFCs and discussion going on. A middleware system will kind of solve this issue in a way, so I'll close this RFC for now.
Thanks for your feedback, I will dig for alternative solution 🙏
Cheers
Summary
Allows to stop execution of an endpoint or accessing a page with Astro SSR in nested functions by utilizing similar API to Remix with
throw Response
.Links