mirror of
https://github.com/YunoHost/moulinette.git
synced 2024-09-03 20:06:31 +02:00
[enh] Use SSL/TLS when calling dyndns API.
This commit is contained in:
parent
608c5dc531
commit
f4472ed6e1
1 changed files with 2 additions and 2 deletions
|
@ -50,7 +50,7 @@ def dyndns_subscribe(subscribe_host="dyndns.yunohost.org", domain=None, key=None
|
|||
|
||||
# Verify if domain is available
|
||||
try:
|
||||
if requests.get('http://%s/test/%s' % (subscribe_host, domain)).status_code != 200:
|
||||
if requests.get('https://%s/test/%s' % (subscribe_host, domain)).status_code != 200:
|
||||
raise MoulinetteError(errno.EEXIST, m18n.n('dyndns_unavailable'))
|
||||
except requests.ConnectionError:
|
||||
raise MoulinetteError(errno.ENETUNREACH, m18n.n('no_internet_connection'))
|
||||
|
@ -71,7 +71,7 @@ def dyndns_subscribe(subscribe_host="dyndns.yunohost.org", domain=None, key=None
|
|||
|
||||
# Send subscription
|
||||
try:
|
||||
r = requests.post('http://%s/key/%s' % (subscribe_host, base64.b64encode(key)), data={ 'subdomain': domain })
|
||||
r = requests.post('https://%s/key/%s' % (subscribe_host, base64.b64encode(key)), data={ 'subdomain': domain })
|
||||
except ConnectionError:
|
||||
raise MoulinetteError(errno.ENETUNREACH, m18n.n('no_internet_connection'))
|
||||
if r.status_code != 201:
|
||||
|
|
Loading…
Add table
Reference in a new issue