@netlify/plugin-nextjs 4.24.0 → 4.24.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -102,8 +102,15 @@ const makeHandler = (conf, app, pageRoot, staticManifest = [], mode = 'ssr') =>
|
|
|
102
102
|
const ttl = getMaxAge(cacheHeader);
|
|
103
103
|
// Long-expiry TTL is basically no TTL, so we'll skip it
|
|
104
104
|
if (ttl > 0 && ttl < ONE_YEAR_IN_SECONDS) {
|
|
105
|
-
|
|
106
|
-
|
|
105
|
+
// ODBs currently have a minimum TTL of 60 seconds
|
|
106
|
+
result.ttl = Math.max(ttl, 60);
|
|
107
|
+
}
|
|
108
|
+
// Only cache 404s ephemerally
|
|
109
|
+
if (ttl === ONE_YEAR_IN_SECONDS && result.statusCode === 404) {
|
|
110
|
+
result.ttl = 60;
|
|
111
|
+
}
|
|
112
|
+
if (result.ttl > 0) {
|
|
113
|
+
requestMode = `odb ttl=${result.ttl}`;
|
|
107
114
|
}
|
|
108
115
|
}
|
|
109
116
|
multiValueHeaders['cache-control'] = ['public, max-age=0, must-revalidate'];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@netlify/plugin-nextjs",
|
|
3
|
-
"version": "4.24.
|
|
3
|
+
"version": "4.24.1",
|
|
4
4
|
"description": "Run Next.js seamlessly on Netlify",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"files": [
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
],
|
|
12
12
|
"dependencies": {
|
|
13
13
|
"@netlify/esbuild": "0.14.39",
|
|
14
|
-
"@netlify/functions": "^1.
|
|
14
|
+
"@netlify/functions": "^1.3.0",
|
|
15
15
|
"@netlify/ipx": "^1.2.5",
|
|
16
16
|
"@vercel/node-bridge": "^2.1.0",
|
|
17
17
|
"chalk": "^4.1.2",
|