diff --git a/resources/default_tweaks.py b/resources/default_tweaks.py index 464c9d2cfd..1cf699efa3 100644 --- a/resources/default_tweaks.py +++ b/resources/default_tweaks.py @@ -363,3 +363,11 @@ maximum_cover_size = (1200, 1600) # the files will be sent to the location with the most free space. send_news_to_device_location = "main" +#: What interfaces should the content server listen on +# By default, the calibre content server listens on '0.0.0.0' which means that it +# accepts IPv4 connections on all interfaces. You can change this to, for +# example, '127.0.0.1' to only listen for connections from the local machine, or +# to '::' to listen to all incoming IPv6 and IPv4 connections (this may not +# work on all operating systems) +server_listen_on = '0.0.0.0' + diff --git a/src/calibre/library/server/__init__.py b/src/calibre/library/server/__init__.py index 244669f50a..950c881d8d 100644 --- a/src/calibre/library/server/__init__.py +++ b/src/calibre/library/server/__init__.py @@ -10,7 +10,7 @@ import os from calibre.utils.config import Config, StringConfig, config_dir, tweaks -listen_on = '0.0.0.0' +listen_on = tweaks['server_listen_on'] log_access_file = os.path.join(config_dir, 'server_access_log.txt')