mirror of
https://github.com/tenrok/axios.git
synced 2026-05-15 11:59:42 +03:00
fix(headers): fixed isValidHeaderName to support full list of allowed characters; (#5584)
This commit is contained in:
@@ -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)) {
|
||||
|
||||
Reference in New Issue
Block a user