File tree Expand file tree Collapse file tree 2 files changed +13
-12
lines changed Expand file tree Collapse file tree 2 files changed +13
-12
lines changed Original file line number Diff line number Diff line change @@ -126,9 +126,10 @@ const getServedBySource = (
126
126
127
127
// NOTE: the order is important here, since a response can be served by a Function even
128
128
// though one or more Edge Functions are also invoked (as middleware).
129
- if ( cacheHeaders . has ( 'X-NF-Function-Type' ) ) return ServedBySource . Function
129
+ if ( cacheHeaders . has ( 'Debug-X-NF-Function-Type' ) )
130
+ return ServedBySource . Function
130
131
131
- if ( cacheHeaders . has ( 'X-NF-Edge-Functions' ) )
132
+ if ( cacheHeaders . has ( 'Debug- X-NF-Edge-Functions' ) )
132
133
return ServedBySource . EdgeFunction
133
134
134
135
throw new Error (
Original file line number Diff line number Diff line change @@ -13,18 +13,18 @@ const CACHE_HEADER_NAMES = [
13
13
'Netlify-Cache-Tag' ,
14
14
'Netlify-Vary' ,
15
15
'Vary' ,
16
- 'X-BB-Deploy-Id' ,
17
- 'X-BB-Gen' ,
18
- 'X-BB-Host-Id' ,
19
- 'X-NF-Cache-Key' ,
20
- 'X-NF-Cache-Info' ,
21
- 'X-NF-Cache-Result' ,
22
- 'X-NF-Durable-Cache-Result' ,
16
+ 'Debug- X-BB-Deploy-Id' ,
17
+ 'Debug- X-BB-Gen' ,
18
+ 'Debug- X-BB-Host-Id' ,
19
+ 'Debug- X-NF-Cache-Key' ,
20
+ 'Debug- X-NF-Cache-Info' ,
21
+ 'Debug- X-NF-Cache-Result' ,
22
+ 'Debug- X-NF-Durable-Cache-Result' ,
23
23
// TODO(serhalp) These two probably shouldn't be here but I use it to determine who served the
24
24
// request. Need to refactor to pass the whole headers obj to `getServedBy` to remove this.
25
- 'X-NF-Edge-Functions' ,
26
- 'X-NF-Function-Type' ,
27
- 'X-NF-Request-Id' ,
25
+ 'Debug- X-NF-Edge-Functions' ,
26
+ 'Debug- X-NF-Function-Type' ,
27
+ 'Debug- X-NF-Request-Id' ,
28
28
'X-Nextjs-Cache' ,
29
29
'X-Nextjs-Date' ,
30
30
]
You can’t perform that action at this time.
0 commit comments