From 0a028041ef5d366a9619d5e6b4ef38d0eac76589 Mon Sep 17 00:00:00 2001 From: Dan Rowe Date: Fri, 29 Jan 2021 12:58:23 -0500 Subject: [PATCH] Handle Nginx http auth + grafana auth separately Went down a rabbit hole because I had my "admin" type directory protected by http auth, but the individual apps have their own user auth. The passed authorization header was causing problems with Grafana. --- grafana.subfolder.conf.sample | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/grafana.subfolder.conf.sample b/grafana.subfolder.conf.sample index fc8c6f6..bfd4278 100644 --- a/grafana.subfolder.conf.sample +++ b/grafana.subfolder.conf.sample @@ -22,6 +22,10 @@ location ^~ /grafana/ { set $upstream_port 3000; set $upstream_proto http; proxy_pass http://$upstream_grafana:$upstream_port ; + + # Clear Authorization Header if you are using http auth and normal Grafana auth + #proxy_set_header Authorization ""; + rewrite ^/grafana/(.*)$ /$1 break; -} \ No newline at end of file +}