Skip to content

Commit

Permalink
fix(headers): fixed isValidHeaderName to support full list of allowed…
Browse files Browse the repository at this point in the history
… characters; (#5584)
  • Loading branch information
DigitalBrainJS committed Mar 19, 2023
1 parent 2e70cec commit e7decef
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions lib/core/AxiosHeaders.js
Expand Up @@ -29,9 +29,7 @@ function parseTokens(str) {
return tokens;
}

function isValidHeaderName(str) {
return /^[-_a-zA-Z]+$/.test(str.trim());
}
const isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());

function matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {
if (utils.isFunction(filter)) {
Expand Down

0 comments on commit e7decef

Please sign in to comment.