5.11.0
Release Image

🍿 Minor Changes

  • #13972 db8f8be Thanks @ematipico! - Updates the NodeApp.match() function in the Adapter API to accept a second, optional parameter to allow adapter authors to add headers to static, prerendered pages.

    NodeApp.match(request) currently checks whether there is a route that matches the given Request. If there is a prerendered route, the function returns undefined, because static routes are already rendered and their headers cannot be updated.

    When the new, optional boolean parameter is passed (e.g. NodeApp.match(request, true)), Astro will return the first matched route, even when it’s a prerendered route. This allows your adapter to now access static routes and provides the opportunity to set headers for these pages, for example, to implement a Content Security Policy (CSP).

🐞 Patch Changes

  • #14029 42562f9 Thanks @ematipico! - Fixes a bug where server islands wouldn’t be correctly rendered when they are rendered inside fragments.

    Now the following examples work as expected:

    ---
    import { Cart } from '../components/Cart.astro';
    ---
    <>
    <Cart server:defer />
    </>
    <Fragment slot="rest">
    <Cart server:defer>
    <div slot="fallback">Not working</div>
    </Cart>
    </Fragment>
  • #14017 8d238bc Thanks @dmgawel! - Fixes a bug where i18n fallback rewrites didn’t work in dynamic pages.