This is an automated email from the ASF dual-hosted git repository.
lynwee pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git
The following commit(s) were added to refs/heads/main by this push:
new d52abffb6 fix: grafana infinitely loop /login (#7335)
d52abffb6 is described below
commit d52abffb6579b4231c7c587822a69d9cc6f7d043
Author: abeizn <[email protected]>
AuthorDate: Tue Apr 16 17:45:49 2024 +0800
fix: grafana infinitely loop /login (#7335)
* fix: grafana 10.4.1 add GF_SERVER_SERVE_FROM_SUB_PATH=false
* fix: grafana 10.4.1 add GF_SERVER_SERVE_FROM_SUB_PATH=true
* fix: grafana 10.4.1 remove rewrite grafana
* fix: grafana infinitely loop /login after upgrade to version 1.0.0-beta4
---
config-ui/nginx.conf | 1 -
grafana/Dockerfile | 1 +
2 files changed, 1 insertion(+), 1 deletion(-)
diff --git a/config-ui/nginx.conf b/config-ui/nginx.conf
index 6e2b7f84d..f37b79213 100644
--- a/config-ui/nginx.conf
+++ b/config-ui/nginx.conf
@@ -52,7 +52,6 @@ ${SERVER_CONF}
resolver ${DNS} valid=${DNS_VALID};
resolver_timeout 3s;
set $target "${GRAFANA_ENDPOINT}";
- rewrite /grafana/(.*) /$1 break;
proxy_set_header Host $http_host;
proxy_set_header Authorization "";
proxy_set_header X-Forwarded-Access-Token "${cookie_access_token}";
diff --git a/grafana/Dockerfile b/grafana/Dockerfile
index 9d62a2168..d3b321aac 100644
--- a/grafana/Dockerfile
+++ b/grafana/Dockerfile
@@ -30,6 +30,7 @@ COPY ./dashboards /etc/grafana/dashboards
COPY ./img/grafana_icon.svg /usr/share/grafana/public/img/grafana_icon.svg
COPY ./img /usr/share/grafana/public/img/lake
ENV GF_USERS_ALLOW_SIGN_UP=false
+ENV GF_SERVER_SERVE_FROM_SUB_PATH=true
ENV GF_DASHBOARDS_JSON_ENABLED=true
ENV GF_LIVE_ALLOWED_ORIGINS='*'
ENV
GF_DASHBOARDS_DEFAULT_HOME_DASHBOARD_PATH=/etc/grafana/dashboards/Homepage.json