diff --git a/browser/app/js/actions.js b/browser/app/js/actions.js index 598124b84..979f1ad97 100644 --- a/browser/app/js/actions.js +++ b/browser/app/js/actions.js @@ -16,10 +16,13 @@ import url from 'url' import Moment from 'moment' +import browserHistory from 'react-router/lib/browserHistory' import web from './web' import * as utils from './utils' import storage from 'local-storage-fallback' +import { minioBrowserPrefix } from './constants' + export const SET_WEB = 'SET_WEB' export const SET_CURRENT_BUCKET = 'SET_CURRENT_BUCKET' export const SET_CURRENT_PATH = 'SET_CURRENT_PATH' @@ -311,6 +314,8 @@ export const selectPrefix = prefix => { })) dispatch(setLoadBucket('')) dispatch(setLoadPath('')) + // Use browserHistory.replace instead of push so that browser back button works fine. + browserHistory.replace(`${minioBrowserPrefix}/login`) }) } }