Skip to main content

render_browser_shell

Function render_browser_shell 

Source
pub fn render_browser_shell(
    config: &PageConfig<'_>,
    ctx: &RenderCtx,
) -> Result<PageResponse, RenderError>
Expand description

Serve a route the build declares browser-rendered (ssr: false): the nonced bundle and the same headers as any page, around an empty root.

By declaration, never in place of a failure: it does not walk. Unknown and SSR routes are refused before document work. Policy, nonce and fault errors retain the same response boundary as a bound SSR page.

Verified by: crates/forma-server/tests/internal_renderer/checked_render.rs > “render_browser_shell_serves_the_bundle_around_an_empty_root_with_the_page_headers”