Skip to content

Commit

Permalink
do not send empty headers (#50)
Browse files Browse the repository at this point in the history
  • Loading branch information
ebrehault authored Apr 11, 2024
1 parent 4fc7a3d commit 91a6419
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "nuclia-sync-agent-app",
"version": "1.2.17",
"version": "1.2.18",
"description": "This is a Nuclia Sync Agent App",
"main": "build/index.js",
"scripts": {
Expand Down
4 changes: 4 additions & 0 deletions server/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# 1.2.18 (2024-04-11)

- Fix: do not send empty headers

# 1.2.17 (2024-04-11)

- Support HTTP headers, cookies and localstorage when uploading links
Expand Down
4 changes: 3 additions & 1 deletion server/src/logic/sync/domain/nuclia-cloud.ts
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,8 @@ export class NucliaCloud {
}

private listToDict(list: { key: string; value: string }[] | undefined): { [key: string]: string } {
return (list || []).reduce((acc, curr) => ({ ...acc, [curr.key]: curr.value }), {} as { [key: string]: string });
return (list || [])
.filter((item) => item.key && item.value)
.reduce((acc, curr) => ({ ...acc, [curr.key]: curr.value }), {} as { [key: string]: string });
}
}

0 comments on commit 91a6419

Please sign in to comment.