@astrojs/netlify
8.2.14 · 13 Nov 2026MIT71.2k / weekRepositoryHomepagenpmAtom feed
7.0.13 is the newest release of 7.x.
In short
1 breaking1 deprecated6 new7 fixed2 internal
- Breaking
Astro v6.0 upgrades to Vite v7.0 as the development server and production bundler - (v6 upgrade guidance)
- Deprecated
Adds new
middlewareModeadapter feature and deprecatesedgeMiddlewareoption
Security
3 advisories affect 7.0.0; 8.2.4 fixes them
- ModerateAstro: Netlify Image CDN allowlist bypass enables SSRFGHSA-4233-jc72-56c5 · 30 Sep 2026Fixed in 8.2.4
- Moderate@astrojs/netlify broadens Astro image.remotePatterns in Netlify Image CDN configGHSA-529g-xq4f-cw38 · 16 Jun 2026Fixed in 7.0.13
- Low@astrojs/netlify generates an overly-broad Netlify Image CDN allowlist because remotePatterns.pathname metacharacters are not escapedGHSA-hp3v-mfqw-h74c · 20 Jul 2026Fixed in 8.1.2
Release note
Major Changes
- Breaking
Astro v6.0 upgrades to Vite v7.0 as the development server and production bundler - (v6 upgrade guidance)
Minor Changes
Stabilizes the adapter feature
experimentalStatiHeaders. If you were using this feature in any of the supported adapters, you'll need to change the name of the flag:export default defineConfig({ adapter: netlify({ - experimentalStaticHeaders: true + staticHeaders: true }) })Adds support for the
fitoption to the image service- Deprecated
Adds new
middlewareModeadapter feature and deprecatesedgeMiddlewareoptionThe
edgeMiddlewareoption is now deprecated and will be removed in a future major release, so users should transition to using the newmiddlewareModefeature as soon as possible.export default defineConfig({ adapter: netlify({ - edgeMiddleware: true + middlewareMode: 'edge' }) }) Adds new session driver object shape
For greater flexibility and improved consistency with other Astro code, session drivers are now specified as an object:
-import { defineConfig } from 'astro/config' +import { defineConfig, sessionDrivers } from 'astro/config' export default defineConfig({ session: { - driver: 'redis', - options: { - url: process.env.REDIS_URL - }, + driver: sessionDrivers.redis({ + url: process.env.REDIS_URL + }), } })Specifying the session driver as a string has been deprecated, but will continue to work until this feature is removed completely in a future major version. The object shape is the current recommended and documented way to configure a session driver.
Updates the implementation to use the new Adapter API
Removes the
experimental.cspflag and replaces it with a new configuration optionsecurity.csp- (v6 upgrade guidance)
Patch Changes
Update to Astro 6 beta
Adds a new
clientAddressoption to thecreateContext()functionProviding this value gives adapter and middleware authors explicit control over the client IP address. When not provided, accessing
clientAddressthrows an error consistent with other contexts where it is not set by the adapter.Additionally, both of the official Netlify and Vercel adapters have been updated to provide this information in their edge middleware.
import { createContext } from 'astro/middleware'; createContext({ clientAddress: context.headers.get('x-real-ip'), });Fixes builds that were failing with "Entry module cannot be external" error when using the Netlify adapter
This error was preventing sites from building after recent internal changes. Your builds should now work as expected without any changes to your code.
Fixes server-rendered routes returning 404 errors
A configuration error in the build output prevented Netlify from correctly routing requests to server-rendered pages, causing them to return 404 errors. This fix ensures that all server routes are properly handled by the Netlify SSR function.
Fixes the image CDN being used in development despite being disabled in certain cases
Updates to use the new Adapter API
Fixes a case where
build.serverEntrywould not be respected when using the new Adapter APIUpdates to new Adapter API introduced in v6
A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.