@astrojs/netlify
8.2.14 · 13 Nov 2026MIT71.2k / weekRepositoryHomepagenpmAtom feed
Your version
8.2.14 is the newest release of 8.x.
In short
1 breaking1 new1 fixed1 internal
- Breaking
Upgrade to Vite v8
Security
2 advisories affect 8.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
- 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
Upgrade to Vite v8
Minor Changes
Adds a CDN cache provider for Astro route caching on Netlify
Caching responses
Use `Astro.cache.set()` in your pages and API routes to cache responses on Netlify's edge network. The provider uses [Netlify's durable cache](https://docs.netlify.com/platform/caching/#durable-directive) so cached responses are shared across all edge nodes, reducing function invocations.
```astro
---
Astro.cache.set({ maxAge: 300, tags: ['products'] });
const data = await fetchProducts();
---
<ProductList items={data} />
```
You can also set cache rules for groups of routes in your config:
```js
cache: { provider: cacheNetlify() },
routeRules: {
'/products/[...slug]': { maxAge: 3600, tags: ['products'] },
'/api/[...path]': { maxAge: 60, swr: 600 },
},
```Invalidation
Purge cached responses by tag or path from any API route or server endpoint:
```ts
// src/pages/api/purge.ts
export async function POST({ request, cache }) {
await cache.invalidate({ tags: ['products'] });
return new Response('Purged');
}
// Path-based invalidation
await cache.invalidate({ path: '/products/123' });
```
Both tag-based and path-based invalidation are supported.Patch Changes
Triggers beta prereleases for packages that are still on alpha
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.