2
0
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:
Dmitriy Mozgovoy
2023-03-19 15:30:51 +02:00
committed by GitHub
parent 2e70cecda4
commit e7decef6a9
+1 -3
View File
@@ -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)) {