Skip to content

Commit c370867

Browse files
Merge branch 'main' into mk/edge-display-name
2 parents a7aa6ce + f804d32 commit c370867

File tree

6 files changed

+94
-74
lines changed

6 files changed

+94
-74
lines changed

.release-please-manifest.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
2-
"packages/runtime": "4.24.3",
2+
"packages/runtime": "4.25.0",
33
"packages/next": "1.3.1"
44
}

package-lock.json

+80-68
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
"@babel/preset-env": "^7.15.8",
4747
"@babel/preset-typescript": "^7.16.0",
4848
"@delucis/if-env": "^1.1.2",
49-
"@netlify/build": "^27.20.3",
49+
"@netlify/build": "^27.20.6",
5050
"@netlify/eslint-config-node": "^7.0.0",
5151
"@testing-library/cypress": "^8.0.1",
5252
"@types/fs-extra": "^9.0.13",

packages/runtime/CHANGELOG.md

+7
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# Changelog
22

3+
## [4.25.0](https://github.com/netlify/next-runtime/compare/plugin-nextjs-v4.24.3...plugin-nextjs-v4.25.0) (2022-10-12)
4+
5+
6+
### Features
7+
8+
* cache redirects for 60 seconds if no ttl provided ([#1677](https://github.com/netlify/next-runtime/issues/1677)) ([23d8d3b](https://github.com/netlify/next-runtime/commit/23d8d3b8fd2267053d83b4e89716ac0c2cd2ca96))
9+
310
## [4.24.3](https://github.com/netlify/next-runtime/compare/plugin-nextjs-v4.24.2...plugin-nextjs-v4.24.3) (2022-10-06)
411

512

packages/runtime/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@netlify/plugin-nextjs",
3-
"version": "4.24.3",
3+
"version": "4.25.0",
44
"description": "Run Next.js seamlessly on Netlify",
55
"main": "lib/index.js",
66
"files": [
@@ -33,7 +33,7 @@
3333
},
3434
"devDependencies": {
3535
"@delucis/if-env": "^1.1.2",
36-
"@netlify/build": "^27.20.3",
36+
"@netlify/build": "^27.20.6",
3737
"@types/fs-extra": "^9.0.13",
3838
"@types/jest": "^27.4.1",
3939
"@types/merge-stream": "^1.1.2",

packages/runtime/src/templates/getHandler.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -131,8 +131,9 @@ const makeHandler = (conf: NextConfig, app, pageRoot, staticManifest: Array<[str
131131
// ODBs currently have a minimum TTL of 60 seconds
132132
result.ttl = Math.max(ttl, 60)
133133
}
134-
// Only cache 404s ephemerally
135-
if (ttl === ONE_YEAR_IN_SECONDS && result.statusCode === 404) {
134+
const ephemeralCodes = [301, 302, 307, 308, 404]
135+
if (ttl === ONE_YEAR_IN_SECONDS && ephemeralCodes.includes(result.statusCode)) {
136+
// Only cache for 60s if default TTL provided
136137
result.ttl = 60
137138
}
138139
if (result.ttl > 0) {

0 commit comments

Comments
 (0)