From 354354ca7243997b41effea7015e630e0de0b86c Mon Sep 17 00:00:00 2001 From: flan Date: Mon, 6 Nov 2017 17:35:29 +0100 Subject: [PATCH] Make built-in server actually use the "host" config field --- ankisyncd.conf | 3 ++- ankisyncd/sync_app.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/ankisyncd.conf b/ankisyncd.conf index 0515f79..e0c35ed 100644 --- a/ankisyncd.conf +++ b/ankisyncd.conf @@ -1,5 +1,6 @@ [sync_app] -host = 127.0.0.1 +# change to 127.0.0.1 if you don't want the server to be accessible from the internet +host = 0.0.0.0 port = 27701 data_root = ./collections base_url = /sync/ diff --git a/ankisyncd/sync_app.py b/ankisyncd/sync_app.py index ab394e7..944d198 100644 --- a/ankisyncd/sync_app.py +++ b/ankisyncd/sync_app.py @@ -692,7 +692,7 @@ def main(): config.read("ankisyncd.conf") ankiserver = SyncApp(config) - httpd = make_server('', config.getint("sync_app", "port"), ankiserver) + httpd = make_server(config.get("sync_app", "host"), config.getint("sync_app", "port"), ankiserver) try: print("Serving HTTP on {} port {}...".format(*httpd.server_address))