fix: fixed home dashboard redirect issue when behind reverse proxy, fixes #12429 (#13135)

This commit is contained in:
Torkel Ödegaard
2018-09-04 15:42:10 +02:00
committed by GitHub
parent 5c0fbbf7c8
commit 826dfceac0

View File

@@ -9,7 +9,8 @@ export class LoadDashboardCtrl {
if (!$routeParams.uid && !$routeParams.slug) {
backendSrv.get('/api/dashboards/home').then(function(homeDash) {
if (homeDash.redirectUri) {
$location.path(homeDash.redirectUri);
const newUrl = locationUtil.stripBaseFromUrl(homeDash.redirectUri);
$location.path(newUrl);
} else {
const meta = homeDash.meta;
meta.canSave = meta.canShare = meta.canStar = false;