From 59c5347ffb302b0e7bf4d87cc26d0f7ceff4042c Mon Sep 17 00:00:00 2001 From: Ryan Cavicchioni Date: Tue, 30 Aug 2022 07:09:23 -0500 Subject: [PATCH] grafana: enable HTTP/2 in nginx --- roles/grafana/templates/nginx.conf.j2 | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/roles/grafana/templates/nginx.conf.j2 b/roles/grafana/templates/nginx.conf.j2 index 7e50bc0..cb8f6b2 100644 --- a/roles/grafana/templates/nginx.conf.j2 +++ b/roles/grafana/templates/nginx.conf.j2 @@ -32,9 +32,9 @@ server { {% if grafana_ssl_enabled is defined and grafana_ssl_enabled %} server { - listen 443 ssl; + listen 443 ssl http2; {% if ansible_all_ipv6_addresses | length %} - listen [::]:443 ssl; + listen [::]:443 ssl http2; {% endif %} server_name {{ grafana_domain }}; @@ -51,6 +51,8 @@ server { ssl_dhparam {{ grafana_ssl_dhparam }}; {% endif %} + proxy_set_header Host $http_host; + location /login { limit_req zone=req_grafana_login burst=10; proxy_pass http://grafana_backend;