summaryrefslogtreecommitdiff
path: root/src/conf_mode/https.py
diff options
context:
space:
mode:
authorJohn Estabrook <jestabro@sentrium.io>2019-08-06 14:19:32 -0500
committerJohn Estabrook <jestabro@sentrium.io>2019-08-07 14:24:39 -0500
commitf86d22ec54ee80cc54ae80edc0bbad8e419ba95c (patch)
treecc178d8470d5413d066460e09542b9ea56d3a235 /src/conf_mode/https.py
parent097a088725eb632bec3e09a2e563fc96139d86ba (diff)
downloadvyos-1x-f86d22ec54ee80cc54ae80edc0bbad8e419ba95c.tar.gz
vyos-1x-f86d22ec54ee80cc54ae80edc0bbad8e419ba95c.zip
[service https] T1443: reset defaults on 'delete service https api'
Diffstat (limited to 'src/conf_mode/https.py')
-rwxr-xr-xsrc/conf_mode/https.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/conf_mode/https.py b/src/conf_mode/https.py
index dae51dd7d..e1e81eef1 100755
--- a/src/conf_mode/https.py
+++ b/src/conf_mode/https.py
@@ -55,10 +55,13 @@ server {
server_name {{ l_addr }};
{% endfor %}
- location / {
+ # proxy settings for HTTP API, if enabled; 503, if not
+ location ~ /(retrieve|configure) {
{% if api %}
proxy_pass http://localhost:{{ api.port }};
proxy_buffering off;
+{% else %}
+ return 503;
{% endif %}
}