mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
AuthN: Make clientTokenRotation work when Grafana is accessible on a sub url (#69385)
Fix clientTokenRotation for auth-proxy
This commit is contained in:
@@ -1,11 +1,13 @@
|
||||
# This will proxy all requests for http://localhost:10080/grafana/ to
|
||||
# This will proxy all requests for http://localhost:8090/grafana/ to
|
||||
# http://localhost:3000 (Grafana running locally)
|
||||
#
|
||||
# Please note that you'll need to change the root_url in the Grafana configuration:
|
||||
# root_url = %(protocol)s://%(domain)s:10080/grafana/
|
||||
# root_url = %(protocol)s://%(domain)s:8090/grafana/
|
||||
|
||||
nginxproxy:
|
||||
build: docker/blocks/auth/nginx_proxy_mac
|
||||
volumes:
|
||||
- "./docker/blocks/auth/nginx_proxy_mac/nginx_login_only.conf:/etc/nginx/nginx.conf"
|
||||
ports:
|
||||
- "10080:10080"
|
||||
- "8090:8090"
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ http {
|
||||
proxy_set_header X-Forwarded-Host $server_name;
|
||||
|
||||
server {
|
||||
listen 10080;
|
||||
listen 8090;
|
||||
|
||||
location /grafana/ {
|
||||
################################################################
|
||||
|
||||
@@ -10,7 +10,7 @@ http {
|
||||
proxy_set_header X-Forwarded-Host $server_name;
|
||||
|
||||
server {
|
||||
listen 10080;
|
||||
listen 8090;
|
||||
|
||||
location /grafana/ {
|
||||
################################################################
|
||||
@@ -28,6 +28,8 @@ http {
|
||||
# header_property = username
|
||||
################################################################
|
||||
|
||||
proxy_set_header Host $host:$server_port;
|
||||
|
||||
location /grafana/login {
|
||||
auth_basic "Restricted Content";
|
||||
auth_basic_user_file /etc/nginx/htpasswd;
|
||||
|
||||
Reference in New Issue
Block a user