Make host/port configurable
This commit is contained in:
parent
29fa0ea435
commit
256625219e
@ -7,3 +7,6 @@ server = https://cloud.example.com
|
||||
user = nextcloud_user
|
||||
password = nextcloud_password
|
||||
|
||||
[webserver]
|
||||
host = 'localhost"
|
||||
port = 8081
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user