From 9bcadd6bdc89c7082cd26fb5a0f08c937b48e356 Mon Sep 17 00:00:00 2001 From: Ben Kristinsson Date: Mon, 3 Oct 2022 00:01:07 +0200 Subject: [PATCH] need to proxy_hide_header to remove the upstream header, otherwise we send the header twice (different versions) in the response and break things --- roles/hass/templates/01-grafana-proxy.j2 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/roles/hass/templates/01-grafana-proxy.j2 b/roles/hass/templates/01-grafana-proxy.j2 index 78db81c..9d46a0e 100644 --- a/roles/hass/templates/01-grafana-proxy.j2 +++ b/roles/hass/templates/01-grafana-proxy.j2 @@ -13,6 +13,10 @@ server { {# proxy_set_header Referer ""; #} proxy_pass https://{{ hass_grafana_proxy_pass }}; + + # hide the CSP header from regular grafana so we can replace it. + # if we dont hide it, we send both back in the reponse. + proxy_hide_header Content-Security-Policy; } access_log /var/log/nginx/access_{{ hass_grafana_proxy_url }}.log main; -- 2.40.1