Skip to content

Commit

Permalink
Update apprelays.js to fix Header issue (#6306)
Browse files Browse the repository at this point in the history
Add `.trim()` to the header label value (`i`) to fix a rare circumstance where there can be a space in the header name.
  • Loading branch information
GraphicHealer authored Aug 5, 2024
1 parent fbd4533 commit 698b7fb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion apprelays.js
Original file line number Diff line number Diff line change
Expand Up @@ -717,7 +717,7 @@ module.exports.CreateWebRelay = function (parent, db, args, domain, mtype) {
}
}
}
else if (blockHeaders.indexOf(i) == -1) { obj.res.set(i, header[i]); } // Set the headers if not blocked
else if (blockHeaders.indexOf(i) == -1) { obj.res.set(i.trim(), header[i]); } // Set the headers if not blocked
}
obj.res.set('Content-Security-Policy', "default-src 'self' 'unsafe-inline' 'unsafe-eval' data: blob:;"); // Set an "allow all" policy, see if the can restrict this in the future
//obj.res.set('Content-Security-Policy', "default-src * 'unsafe-inline' 'unsafe-eval'; script-src * 'unsafe-inline' 'unsafe-eval'; connect-src * 'unsafe-inline'; img-src * data: blob: 'unsafe-inline'; frame-src *; style-src * 'unsafe-inline';"); // Set an "allow all" policy, see if the can restrict this in the future
Expand Down

0 comments on commit 698b7fb

Please sign in to comment.