Skip to content

Commit 4f5f563

Browse files
committed
fix: drop empty directives to not produce invalid header values
1 parent 0ab5748 commit 4f5f563

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Diff for: src/run/headers.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,10 @@ const generateNetlifyVaryValues = ({
5454
}
5555

5656
const getHeaderValueArray = (header: string): string[] => {
57-
return header.split(',').map((value) => value.trim())
57+
return header
58+
.split(',')
59+
.map((value) => value.trim())
60+
.filter(Boolean)
5861
}
5962

6063
const omitHeaderValues = (header: string, values: string[]): string => {

0 commit comments

Comments
 (0)