Merge pull request #3730 from kyletaylored/feature/2971-detect-plain-text

Add plain/text detection
main
Elbert Alias 5 years ago committed by GitHub
commit 76890d3e60
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -267,12 +267,7 @@ const Driver = {
) )
}) })
if ( await Driver.onDetect(request.url, analyze({ headers }))
headers['content-type'] &&
/\/x?html/.test(headers['content-type'][0])
) {
await Driver.onDetect(request.url, analyze({ headers }))
}
} }
} catch (error) { } catch (error) {
Driver.error(error) Driver.error(error)