diff --git a/config.example.ini b/config.example.ini index 1cede7c..d91c068 100644 --- a/config.example.ini +++ b/config.example.ini @@ -7,3 +7,6 @@ server = https://cloud.example.com user = nextcloud_user password = nextcloud_password +[webserver] +host = 'localhost" +port = 8081 diff --git a/icloud_to_nextcloud.py b/icloud_to_nextcloud.py index 1d54ee4..3848dd5 100644 --- a/icloud_to_nextcloud.py +++ b/icloud_to_nextcloud.py @@ -106,7 +106,10 @@ def get_icloud_location(config): "Two-factor authentication required. " "Head over to http://localhost:8080 and fill-in the 2FA code." ) - server = StoppableCherootServer(port=8080) + server = StoppableCherootServer( + host=config['webserver']['host'], + port=config['webserver']['port'] + ) app.run(server=server) result = api.validate_2fa_code(code_2fa) print("Code validation result: %s" % result)