summaryrefslogtreecommitdiff
path: root/src/conf_mode/https.py
diff options
context:
space:
mode:
authorJohn Estabrook <jestabro@sentrium.io>2019-11-14 13:17:40 -0600
committerJohn Estabrook <jestabro@sentrium.io>2019-11-18 14:19:57 -0600
commit3dc8a88d098497c5c24df3e77a148fde4314d874 (patch)
tree57394c226111b1b63b7e08868c1c3f0bf779798f /src/conf_mode/https.py
parentead28e2ab3ed6a05f724aa7eda17dff7f637af89 (diff)
downloadvyos-1x-3dc8a88d098497c5c24df3e77a148fde4314d874.tar.gz
vyos-1x-3dc8a88d098497c5c24df3e77a148fde4314d874.zip
[service https] T1443: add setting of HTTPS listen port
(cherry picked from commit 6b25ed2a44dde77f5cbfbf68fb4f5f661a34c1c0)
Diffstat (limited to 'src/conf_mode/https.py')
-rwxr-xr-xsrc/conf_mode/https.py6
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[:]