summaryrefslogtreecommitdiff
path: root/data/templates/https
diff options
context:
space:
mode:
authorJohn Estabrook <jestabro@vyos.io>2023-03-29 19:48:52 -0500
committerJohn Estabrook <jestabro@vyos.io>2023-03-31 12:14:56 -0500
commit11b1d043310833447ddeea3b68fba2a1d1f5799d (patch)
tree2789494d62355cdd0648a0084b7a97aa70d8bea1 /data/templates/https
parent11ace86f58261908f1ab15366b73aeddb14745c9 (diff)
downloadvyos-1x-11b1d043310833447ddeea3b68fba2a1d1f5799d.tar.gz
vyos-1x-11b1d043310833447ddeea3b68fba2a1d1f5799d.zip
http-api: T5126: allow restricting client IP address
Diffstat (limited to 'data/templates/https')
-rw-r--r--data/templates/https/nginx.default.j26
1 files changed, 6 insertions, 0 deletions
diff --git a/data/templates/https/nginx.default.j2 b/data/templates/https/nginx.default.j2
index d42b3b389..b541ff309 100644
--- a/data/templates/https/nginx.default.j2
+++ b/data/templates/https/nginx.default.j2
@@ -50,6 +50,12 @@ server {
{% else %}
return 503;
{% endif %}
+{% if server.allow_client %}
+{% for client in server.allow_client %}
+ allow {{ client }};
+{% endfor %}
+ deny all;
+{% endif %}
}
error_page 497 =301 https://$host:{{ server.port }}$request_uri;