diff --git a/src/is-binary.js b/src/is-binary.js index 264a307f..6164c9ca 100644 --- a/src/is-binary.js +++ b/src/is-binary.js @@ -21,7 +21,7 @@ function getContentType ({ headers }) { function isContentTypeBinary ({ headers, binaryContentTypes }) { if (!binaryContentTypes || !Array.isArray(binaryContentTypes)) return false - const binaryContentTypesRegexes = binaryContentTypes.map(binaryContentType => new RegExp(`^${binaryContentType.replace(/\*/g, '.*')}$`)) + const binaryContentTypesRegexes = binaryContentTypes.map(binaryContentType => new RegExp(`^${binaryContentType.replace(/\*|\.\*/g, '.*')}$`)) const contentType = getContentType({ headers }) if (!contentType) return false