1.1 --- a/imiptools/config.py Sun Nov 01 18:59:15 2015 +0100
1.2 +++ b/imiptools/config.py Sun Nov 01 23:58:21 2015 +0100
1.3 @@ -54,6 +54,10 @@
1.4
1.5 MANAGER_URL = None
1.6
1.7 +# The protocol scheme used if constructing URLs.
1.8 +
1.9 +MANAGER_URL_SCHEME = "http://"
1.10 +
1.11
1.12
1.13 # Preferences defaults applicable unless overridden by the user.
2.1 --- a/imiptools/handlers/__init__.py Sun Nov 01 18:59:15 2015 +0100
2.2 +++ b/imiptools/handlers/__init__.py Sun Nov 01 23:58:21 2015 +0100
2.3 @@ -21,7 +21,7 @@
2.4
2.5 from email.mime.text import MIMEText
2.6 from imiptools.client import ClientForObject
2.7 -from imiptools.config import MANAGER_PATH, MANAGER_URL
2.8 +from imiptools.config import MANAGER_PATH, MANAGER_URL, MANAGER_URL_SCHEME
2.9 from imiptools.data import get_address, get_uri, get_sender_identities, \
2.10 uri_dict, uri_item
2.11 from socket import gethostname
2.12 @@ -29,7 +29,8 @@
2.13 # References to the Web interface.
2.14
2.15 def get_manager_url():
2.16 - url_base = MANAGER_URL or "http://%s/" % gethostname()
2.17 + url_base = MANAGER_URL or \
2.18 + "%s%s/" % (MANAGER_URL_SCHEME or "https://", gethostname())
2.19 return "%s/%s" % (url_base.rstrip("/"), MANAGER_PATH.lstrip("/"))
2.20
2.21 def get_object_url(uid, recurrenceid=None):