Skip to content

Commit

Permalink
fix: drop empty directives to not produce invalid header values
Browse files Browse the repository at this point in the history
  • Loading branch information
pieh committed Oct 14, 2024
1 parent 0ab5748 commit 4f5f563
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/run/headers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,10 @@ const generateNetlifyVaryValues = ({
}

const getHeaderValueArray = (header: string): string[] => {
return header.split(',').map((value) => value.trim())
return header
.split(',')
.map((value) => value.trim())
.filter(Boolean)
}

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

0 comments on commit 4f5f563

Please sign in to comment.