From c8aece55130f6096ba54fb83e6cace6d3ece98ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torma=20Krist=C3=B3f?= Date: Sun, 29 May 2022 19:11:16 +0200 Subject: [PATCH] restrics metrics --- roles/webserver/templates/nginx.conf | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/roles/webserver/templates/nginx.conf b/roles/webserver/templates/nginx.conf index a37c666..1c920e6 100644 --- a/roles/webserver/templates/nginx.conf +++ b/roles/webserver/templates/nginx.conf @@ -79,6 +79,15 @@ http { proxy_pass http://127.0.0.1:{{ server.port }}; {%- endif %} } + location /metrics{ + {%- if server.https %} + proxy_pass https://127.0.0.1:{{ server.port }}; + {%- else %} + proxy_pass http://127.0.0.1:{{ server.port }}; + {%- endif %} + allow 192.168.69.0/24; + deny all; + } } {%- endfor %}