You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be beneficial to protect prerendered sites using a middleware. (see original issue here: nuxt/nuxt#28771 (comment) and the comment of @danielroe )
I understand that prerendered HTML is usually served as static files for performance and SEO, which explains why it's not protected by default.
For my private Nuxt Content site, users must authenticate before accessing it. Ideally, I would like to prerender Markdown at build time and serve the static HTML after checking permissions with middleware.
This discussion was converted from issue #2704 on September 04, 2024 09:45.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Describe the feature
It would be beneficial to protect prerendered sites using a middleware. (see original issue here: nuxt/nuxt#28771 (comment) and the comment of @danielroe )
I understand that prerendered HTML is usually served as static files for performance and SEO, which explains why it's not protected by default.
For my private Nuxt Content site, users must authenticate before accessing it. Ideally, I would like to prerender Markdown at build time and serve the static HTML after checking permissions with middleware.
Astro has a similar discussion with more use cases: withastro/roadmap#869. Next seems to have something called partial prerendering: https://nextjs.org/learn/dashboard-app/partial-prerendering
Would it be possible to introduce a new routeRoule that prerenders but runs through the middleware when requesting the route?
Beta Was this translation helpful? Give feedback.
All reactions