Skip to content

Commit 35eb96f

Browse files
committed
chore: add debug headers
1 parent 8576607 commit 35eb96f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/templates/getHandler.js

+3
Original file line numberDiff line numberDiff line change
@@ -170,9 +170,12 @@ const makeHandler =
170170
if (mode === 'odb' && process.env.EXPERIMENTAL_ODB_TTL) {
171171
mode = 'isr'
172172
const ttl = getMaxAge(cacheHeader)
173+
multiValueHeaders['x-raw-ttl'] = [ttl]
174+
173175
// Long-expiry TTL is basically no TTL
174176
if (ttl > 0 && ttl < ONE_YEAR_IN_SECONDS) {
175177
result.ttl = Math.min(ttl, 60)
178+
multiValueHeaders['x-ttl-result'] = [result.ttl]
176179
}
177180
}
178181
multiValueHeaders['cache-control'] = ['public, max-age=0, must-revalidate']

0 commit comments

Comments
 (0)