Astro: @astrojs/[email protected] Release

Release date:
March 4, 2026
Previous version:
@astrojs/[email protected] (released February 26, 2026)
Magnitude:
6,597 Diff Delta
Contributors:
6 total committers
Data confidence:
Commits:

32 Commits in this Release

Ordered by the degree to which they evolved the repo in this version.

Authored March 4, 2026
Authored February 27, 2026
Authored February 27, 2026
Authored March 4, 2026
Authored March 2, 2026
Authored March 2, 2026
Authored February 28, 2026
Authored March 4, 2026
Authored February 27, 2026

Top Contributors in @astrojs/[email protected]

ematipico
florian-lefebvre
Princesseuh
renovate-bot
jcayzac
ArmandPhilippot

Directory Browser for @astrojs/[email protected]

We haven't yet finished calculating and confirming the files and directories changed in this release. Please check back soon.

Release Notes Published

Major Changes

  • #15654 a32aee6 Thanks @florian-lefebvre! - Removes the experimentalErrorPageHost option

    This option allowed fetching a prerendered error page from a different host than the server is currently running on.

    However, there can be security implications with prefetching from other hosts, and often more customization was required to do this safely. This has now been removed as a built-in option so that you can implement your own secure solution as needed and appropriate for your project via middleware.

    What should I do?

    If you were previously using this feature, you must remove the option from your adapter configuration as it no longer exists:

    // astro.config.mjs
    import { defineConfig } from 'astro/config'
    import node from '@astrojs/node'
    
    export default defineConfig({
      adapter: node({
        mode: 'standalone',
    -    experimentalErrorPageHost: 'http://localhost:4321'
      })
    })
    

    You can replicate the previous behavior by checking the response status in a middleware and fetching the prerendered page yourself:

    // src/middleware.ts
    import { defineMiddleware } from 'astro:middleware';
    
    export const onRequest = defineMiddleware(async (ctx, next) => {
      const response = await next();
      if (response.status === 404 || response.status === 500) {
        return fetch(`http://localhost:4321/${response.status}.html`);
      }
      return response;
    });
    

Patch Changes

  • #15714 9a2c949 Thanks @ematipico! - Fixes an issue where static headers weren't correctly applied when the website uses base.

  • #15745 20b05c0 Thanks @matthewp! - Hardens static file handler path resolution to ensure resolved paths stay within the client directory