Server fixes
This commit is contained in:
@ -23,7 +23,13 @@ class Middleware
|
||||
{
|
||||
$container = Application::getContainer();
|
||||
$uri = $request->getUri();
|
||||
|
||||
$path = $uri->getPath();
|
||||
|
||||
if (substr($path, 0, 1) != '/') {
|
||||
$path = "/".$path;
|
||||
}
|
||||
|
||||
$query = $uri->getQuery();
|
||||
|
||||
// Check for an existing session
|
||||
@ -33,7 +39,7 @@ class Middleware
|
||||
// Redirect to the login page
|
||||
if ($query !== "") {
|
||||
return Redirect::create($request, $response, '/login?redirect='.$path."&".$query);
|
||||
} elseif ($path = "/") {
|
||||
} elseif ($path === "/") {
|
||||
return Redirect::create($request, $response, '/login');
|
||||
} else {
|
||||
return Redirect::create($request, $response, '/login?redirect='.$path);
|
||||
|
Reference in New Issue
Block a user