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.
This commit is contained in:
Dan Rowe 2021-01-29 12:58:23 -05:00 committed by GitHub
parent 77a6dee131
commit 0a028041ef
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -22,6 +22,10 @@ location ^~ /grafana/ {
set $upstream_port 3000; set $upstream_port 3000;
set $upstream_proto http; set $upstream_proto http;
proxy_pass http://$upstream_grafana:$upstream_port ; 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; rewrite ^/grafana/(.*)$ /$1 break;
} }