diff --git a/doc/source/install.rst b/doc/source/install.rst index 8c57ecc..b298d46 100644 --- a/doc/source/install.rst +++ b/doc/source/install.rst @@ -124,6 +124,10 @@ MPD_WAIT_START_RETRYSECS Web interface ^^^^^^^^^^^^^^^^ +HTTP_ADDRESS + The address that the HTTP interface will listen to; defaults to `0.0.0.0` +HTTP_PORT + The port that the HTTP interface will listen to; defaults to `5000` FILE_PATH_SUGGESTION A list of paths. Those paths will be scanned for suggestions in audiogenerator forms. UI_CALENDAR_FREQUENCY_THRESHOLD diff --git a/larigira/config.py b/larigira/config.py index 8a698d2..08a155d 100644 --- a/larigira/config.py +++ b/larigira/config.py @@ -38,6 +38,7 @@ def get_conf(prefix="LARIGIRA_"): conf["UI_CALENDAR_OCCURRENCIES_THRESHOLD"] = 40 conf["UI_CALENDAR_DATE_FMT"] = "medium" conf["EVENT_FILTERS"] = [] + conf["HTTP_ADDRESS"] = "0.0.0.0" conf["HTTP_PORT"] = 5000 conf["HOME_URL"] = "/db/calendar" conf.update(from_envvars(prefix=prefix)) diff --git a/larigira/larigira.py b/larigira/larigira.py index ea1e93c..e0ccb94 100644 --- a/larigira/larigira.py +++ b/larigira/larigira.py @@ -36,7 +36,7 @@ class Larigira(object): self.controller = Controller(self.conf) self.controller.link_exception(on_main_crash) self.http_server = WSGIServer( - ("", int(self.conf["HTTP_PORT"])), + (self.conf["HTTP_ADDRESS"], int(self.conf["HTTP_PORT"])), create_app(self.controller.q, self), )