util: fix browser detection

This commit is contained in:
Peter Cai 2020-02-19 08:47:22 +08:00
parent 9f7cbdee95
commit ed625596df
No known key found for this signature in database
GPG key ID: 71F5FB4E4F3FD54F

View file

@ -49,7 +49,7 @@ isText = (mime) ->
# Determine if we consider the user a browser or not # Determine if we consider the user a browser or not
isBrowser = (req) -> isBrowser = (req) ->
b = detectBrowser req.headers.get 'user-agent' b = detectBrowser req.headers.get 'user-agent'
(not b) or (b.name != 'searchbot') b and (b.name != 'searchbot')
export { export {
getFileName, getFileName,