File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ import type { NextConfigComplete } from 'next/dist/server/config-shared.js'
4
4
import type { WorkerRequestHandler } from 'next/dist/server/lib/types.js'
5
5
6
6
import { RUN_DIR } from '../helpers/constants.js'
7
- import { setCacheControlHeaders , setVaryHeaders } from '../helpers/headers.js'
7
+ import { setCacheControlHeaders , setCacheTagsHeaders , setVaryHeaders } from '../helpers/headers.js'
8
8
9
9
let nextHandler : WorkerRequestHandler , nextConfig : NextConfigComplete
10
10
@@ -30,6 +30,7 @@ export default async (request: Request) => {
30
30
res . prependListener ( '_headersSent' , ( event : HeadersSentEvent ) => {
31
31
const headers = new Headers ( event . headers )
32
32
setCacheControlHeaders ( headers )
33
+ setCacheTagsHeaders ( headers )
33
34
setVaryHeaders ( headers , request , nextConfig )
34
35
event . headers = Object . fromEntries ( headers . entries ( ) )
35
36
console . log ( 'Modified response headers:' , JSON . stringify ( event . headers , null , 2 ) )
Original file line number Diff line number Diff line change @@ -85,3 +85,7 @@ export const setCacheControlHeaders = (headers: Headers) => {
85
85
headers . set ( 'netlify-cdn-cache-control' , cacheControl )
86
86
}
87
87
}
88
+
89
+ export const setCacheTagsHeaders = ( headers : Headers ) => {
90
+ // TODO: implement
91
+ }
You can’t perform that action at this time.
0 commit comments