Content server: Use /mobile version for Kindle browser

This commit is contained in:
Kovid Goyal 2010-09-03 13:37:45 -06:00
parent 2747c85842
commit 809ea18248
2 changed files with 2 additions and 2 deletions

View File

@ -156,7 +156,7 @@ def build_index(books, num, search, sort, order, start, total, url_base, CKEYS):
class MobileServer(object): class MobileServer(object):
'A view optimized for browsers in mobile devices' 'A view optimized for browsers in mobile devices'
MOBILE_UA = re.compile('(?i)(?:iPhone|Opera Mini|NetFront|webOS|Mobile|Android|imode|DoCoMo|Minimo|Blackberry|MIDP|Symbian|HD2)') MOBILE_UA = re.compile('(?i)(?:iPhone|Opera Mini|NetFront|webOS|Mobile|Android|imode|DoCoMo|Minimo|Blackberry|MIDP|Symbian|HD2|Kindle)')
def add_routes(self, connect): def add_routes(self, connect):
connect('mobile', '/mobile', self.mobile) connect('mobile', '/mobile', self.mobile)

View File

@ -223,7 +223,7 @@ the server has IP address 63.45.128.5, in the browser, you would type::
http://63.45.128.5:8080 http://63.45.128.5:8080
Some devices, like the Kindle, do not allow you to access port 8080 (the default port on which the content Some devices, like the Kindle (1/2/DX), do not allow you to access port 8080 (the default port on which the content
server runs. In that case, change the port in the |app| Preferences to 80. (On some operating systems, server runs. In that case, change the port in the |app| Preferences to 80. (On some operating systems,
you may not be able to run the server on a port number less than 1024 because of security settings. In you may not be able to run the server on a port number less than 1024 because of security settings. In
this case the simplest solution is to adjust your router to forward requests on port 80 to port 8080). this case the simplest solution is to adjust your router to forward requests on port 80 to port 8080).