diff options
author | John Estabrook <jestabro@sentrium.io> | 2019-11-14 13:33:39 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-11-14 13:33:39 -0600 |
commit | 7456967924cc771b00488618a6edbd52e6ed6b15 (patch) | |
tree | c638fa39018909db15e56d51188b1a4220321c02 /src | |
parent | c9c8cd50f4165c7f86e71a6723f0ebb3a2cbdaf5 (diff) | |
parent | 6b25ed2a44dde77f5cbfbf68fb4f5f661a34c1c0 (diff) | |
download | vyos-1x-7456967924cc771b00488618a6edbd52e6ed6b15.tar.gz vyos-1x-7456967924cc771b00488618a6edbd52e6ed6b15.zip |
Merge pull request #164 from jestabro/T1443
[service https] T1443: add setting of HTTPS listen port
Diffstat (limited to 'src')
-rwxr-xr-x | src/conf_mode/https.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/conf_mode/https.py b/src/conf_mode/https.py index d7fcb74de..fbd351e45 100755 --- a/src/conf_mode/https.py +++ b/src/conf_mode/https.py @@ -49,7 +49,7 @@ server { listen 443 ssl; listen [::]:443 ssl; {% else %} - listen {{ server.address }}:443 ssl; + listen {{ server.address }}:{{ server.port }} ssl; {% endif %} {% for name in server.name %} @@ -107,7 +107,11 @@ def get_config(): if conf.exists('listen-address'): for addr in conf.list_nodes('listen-address'): server_block = {'address' : addr} + server_block['port'] = '443' server_block['name'] = ['_'] + if conf.exists('listen-address {0} listen-port'.format(addr)): + port = conf.return_value('listen-address {0} listen-port'.format(addr)) + server_block['port'] = port if conf.exists('listen-address {0} server-name'.format(addr)): names = conf.return_values('listen-address {0} server-name'.format(addr)) server_block['name'] = names[:] |