@netlify/plugin-nextjs 4.24.2 → 4.25.0
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.
|
@@ -105,8 +105,9 @@ const makeHandler = (conf, app, pageRoot, staticManifest = [], mode = 'ssr') =>
|
|
|
105
105
|
// ODBs currently have a minimum TTL of 60 seconds
|
|
106
106
|
result.ttl = Math.max(ttl, 60);
|
|
107
107
|
}
|
|
108
|
-
|
|
109
|
-
if (ttl === ONE_YEAR_IN_SECONDS && result.statusCode
|
|
108
|
+
const ephemeralCodes = [301, 302, 307, 308, 404];
|
|
109
|
+
if (ttl === ONE_YEAR_IN_SECONDS && ephemeralCodes.includes(result.statusCode)) {
|
|
110
|
+
// Only cache for 60s if default TTL provided
|
|
110
111
|
result.ttl = 60;
|
|
111
112
|
}
|
|
112
113
|
if (result.ttl > 0) {
|
package/lib/templates/ipx.js
CHANGED
|
@@ -9,6 +9,5 @@ exports.handler = (0, ipx_1.createIPXHandler)({
|
|
|
9
9
|
domains: imageconfig_json_1.domains,
|
|
10
10
|
remotePatterns: imageconfig_json_1.remotePatterns,
|
|
11
11
|
responseHeaders: imageconfig_json_1.responseHeaders,
|
|
12
|
-
localPrefix: '/_next/static/media/',
|
|
13
12
|
});
|
|
14
13
|
/* eslint-enable n/no-missing-import, import/no-unresolved, @typescript-eslint/ban-ts-comment */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@netlify/plugin-nextjs",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.25.0",
|
|
4
4
|
"description": "Run Next.js seamlessly on Netlify",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"files": [
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"@delucis/if-env": "^1.1.2",
|
|
36
|
-
"@netlify/build": "^27.20.
|
|
36
|
+
"@netlify/build": "^27.20.6",
|
|
37
37
|
"@types/fs-extra": "^9.0.13",
|
|
38
38
|
"@types/jest": "^27.4.1",
|
|
39
39
|
"@types/merge-stream": "^1.1.2",
|