Browse Source

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

Torkel Ödegaard 7 years ago
parent
commit
826dfceac0
1 changed files with 2 additions and 1 deletions
  1. 2 1
      public/app/routes/dashboard_loaders.ts

+ 2 - 1
public/app/routes/dashboard_loaders.ts

@@ -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;