Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

BUGFIX: Added Mac OS X Dashboard web clip support to the browser-chec…

…k HTTP middleware.
  • Loading branch information...
commit dde2bc5e29b945dbee03b40e773fb2d1499ca5d4 1 parent 38b5d2f
@paulbjensen paulbjensen authored
Showing with 6 additions and 1 deletion.
  1. +6 −1 lib/http_middleware/browser_check.coffee
View
7 lib/http_middleware/browser_check.coffee
@@ -37,7 +37,7 @@ isValidRequest = (request) ->
# Capture headless browsers (e.g. spiders)
return true unless ua?
-
+
# Allow Chrome version 4 and above
if ua.match(/Chrom(e|ium)/)
re = new RegExp("Chrom(e|ium)/([0-9]{1,})")
@@ -52,6 +52,11 @@ isValidRequest = (request) ->
version = parseFloat( RegExp.$1 )
return false if version >= 5
+ # Mac OS X Dashboard Web Clip
+ return false if ua.match(/WebClip/)
+ # TODO - find out what version of AppleWebKit (~ 533) implemented websockets,
+ # will allow for greater refactoring of code above.
+
# Else show the Browser Incompatible page
true
Please sign in to comment.
Something went wrong with that request. Please try again.