You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The library is converting the null value into the null string headers, e.g. for the CLIENTTYPE_HEADER_KEY. This results in forwarding that given header with the null string as value even when the header is actually not provided/forwarder.
The description of the bug or the rationale of your proposal
The library should not forward heraders when those are set to null, or at least forward those with an empty string instead.
Note that while this bug has been discovered for the CLIENTTYPE_HEADER_KEY, it is impacting also other headers.
A snippet of code for replicating the issue or showing the proposal usage if applicable
A possible solution can be replacing:
function getClientType(clientType) {
return clientType || null
}
with:
function getClientType(clientType) {
return clientType || ''
}
The expected result for your bug
The library should not forward a header if the header is set to null.
The feature or bug you are proposing
The library is converting the
null
value into thenull
string headers, e.g. for theCLIENTTYPE_HEADER_KEY
. This results in forwarding that given header with thenull
string as value even when the header is actually not provided/forwarder.The description of the bug or the rationale of your proposal
The library should not forward heraders when those are set to
null
, or at least forward those with an empty string instead.Note that while this bug has been discovered for the
CLIENTTYPE_HEADER_KEY
, it is impacting also other headers.A snippet of code for replicating the issue or showing the proposal usage if applicable
A possible solution can be replacing:
with:
The expected result for your bug
The library should not forward a header if the header is set to null.
Your environment
node: 12.19.0-alpine
custom-plugin-lib: 4.2.0
os: --
The text was updated successfully, but these errors were encountered: