diff options
author | Magnus Ahltorp <map@kth.se> | 2015-03-31 00:35:57 +0200 |
---|---|---|
committer | Magnus Ahltorp <map@kth.se> | 2015-03-31 00:35:57 +0200 |
commit | 1462b94617b0c97b9e625d2c3a379a734ecb1dd8 (patch) | |
tree | 63508f318361150ba35bbe17c18ab3e146dd20f1 /tools/compileconfig.py | |
parent | 63bb7bbdad8c7b21630cedaea2f2b82aa62fd59d (diff) |
Fixnopublicssl2
Diffstat (limited to 'tools/compileconfig.py')
-rwxr-xr-x | tools/compileconfig.py | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/tools/compileconfig.py b/tools/compileconfig.py index f3e858b..4996994 100755 --- a/tools/compileconfig.py +++ b/tools/compileconfig.py @@ -77,7 +77,7 @@ def get_node_config(nodename, config): sys.exit(1) return (nodetype, nodeconfig) -def gen_http_servers(nodetype, nodeconfig, bind_address, bind_publicaddress, public_https): +def gen_http_servers(nodetype, nodeconfig, bind_address, bind_publicaddress, bind_publichttpaddress): if bind_address: (host, port) = parse_address(bind_address) else: @@ -92,10 +92,10 @@ def gen_http_servers(nodetype, nodeconfig, bind_address, bind_publicaddress, pub http_servers = [] https_servers = [] - if public_https: - https_servers.append((Symbol("external_https_api"), publichost, publicport, Symbol("v1"))) - else: - http_servers.append((Symbol("external_http_api"), publichost, publicport, Symbol("v1"))) + if bind_publichttpaddress: + (publichttphost, publichttpport) = parse_address(bind_publichttpaddress) + http_servers.append((Symbol("external_http_api"), publichttphost, publichttpport, Symbol("v1"))) + https_servers.append((Symbol("external_https_api"), publichost, publicport, Symbol("v1"))) https_servers.append((Symbol("frontend_https_api"), host, port, Symbol("frontend"))) return (http_servers, https_servers) @@ -155,15 +155,14 @@ def gen_config(nodename, config, localconfig): paths = localconfig["paths"] bind_address = localconfig.get("addresses", {}).get(nodename) bind_publicaddress = localconfig.get("publicaddresses", {}).get(nodename) + bind_publichttpaddress = localconfig.get("publichttpaddresses", {}).get(nodename) options = localconfig.get("options", []) configfile = open(paths["configdir"] + nodename + ".config", "w") print >>configfile, "%% catlfish configuration file (-*- erlang -*-)" - public_https = "nopublichttps" not in options - (nodetype, nodeconfig) = get_node_config(nodename, config) - (http_servers, https_servers) = gen_http_servers(nodetype, nodeconfig, bind_address, bind_publicaddress, public_https=public_https) + (http_servers, https_servers) = gen_http_servers(nodetype, nodeconfig, bind_address, bind_publicaddress, bind_publichttpaddress=bind_publichttpaddress) catlfishconfig = [] plopconfig = [] |