diff --git a/brewman/static/scripts/overlord.js b/brewman/static/scripts/overlord.js index e1374269..b8a93fec 100644 --- a/brewman/static/scripts/overlord.js +++ b/brewman/static/scripts/overlord.js @@ -141,7 +141,7 @@ overlord.controller('BaseCtrl', ['$rootScope', '$scope', 'Auth', '$location', '$ } else { var came_from = $routeParams.came_from; if (angular.isUndefined(came_from) && $location.path() !== '/login') { - came_from = $location.path(); + came_from = $location.url(); } $location.path('/login').search({came_from: came_from}); } diff --git a/brewman/views/__init__.py b/brewman/views/__init__.py index 619dcff8..5d7ff43c 100644 --- a/brewman/views/__init__.py +++ b/brewman/views/__init__.py @@ -28,7 +28,7 @@ def forbidden(request): response.status_int = 401 return response else: - return HTTPFound(location=request.route_url('login', _query={'came_from': request.path})) + return HTTPFound(location=request.route_url('login', _query={'came_from': request.path_qs})) @view_config(route_name='favicon')