Skip to content

Commit

Permalink
fix(headers): Header parsing fix (#12)
Browse files Browse the repository at this point in the history
* fix provenance

* fix urls

* remove randexp

* refactor originhost and transhost, reuse more code. Add incoming data logging config option

* fix example config. Refactor index.js logging

* update README, fix README

* fix typo readme

* allow authenticatedUser in form of username[email] to be parsed correctly

* regex changes

* regex fixes

* remove regex case insensitive

* fix header parsing
  • Loading branch information
NickOvt authored Aug 16, 2024
1 parent 8a06fbc commit b12185d
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,12 @@ module.exports.init = async app => {

// Change headers to the format that Zilter will accept
for (const headerObj of envelope.headers.getList()) {
// Get header Key and Value from line
const splittedByFirstColumn = headerObj.line.split(/:(.*)/s);

messageHeadersList.push({
name: headerObj.key,
value: headerObj.line
name: splittedByFirstColumn[0].trim(), // Header key
value: splittedByFirstColumn[1].trim() // Rest of string (i.e actual header value)
});
}

Expand Down

0 comments on commit b12185d

Please sign in to comment.