Page Redirection/Loading Error

I have been stuck with the issue for months any help would be great.

My web page is written on php laravel. After several minutes of logged in state the page shows this message, " The page isn’t redirecting properly. Firefox has detected that the server requesting for this page address in a way that will never complete. This problem can sometimes be caused by disabling or refusing to accept cookies."

I have disabled the session timed out option on the site with the same result.

It also happens when trying to revisit the site after I closed the page tab without logging out from the page.

The only way I can get back to the site is by clearing browser cash, cookies.

It’s hosted on a subdomain, e.g. app.maindomain.com.

thanks

Middleware:

[php]
class Kernel extends HttpKernel
{
/**
* The application’s global HTTP middleware stack.
*
* These middleware are run during every request to your application.
*
* @var array
*/
protected $middleware = [
\Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode::class,
\Illuminate\Session\Middleware\StartSession::class,
\Illuminate\View\Middleware\ShareErrorsFromSession::class,
];

/**
 * The application's route middleware groups.
 *
 * @var array
 */
protected $middlewareGroups = [
    'web' => [
        \MyNamespace\Http\Middleware\EncryptCookies::class,
        \Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class,
        \MyNamespace\Http\Middleware\VerifyCsrfToken::class,
    ],

    'api' => [
        'throttle:60,1',
    ],
];

/**
 * The application's route middleware.
 *
 * These middleware may be assigned to groups or used individually.
 *
 * @var array
 */
protected $routeMiddleware = [
    'auth' => \MyNamespace\Http\Middleware\Authenticate::class,
    'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class,
    'can' => \Illuminate\Foundation\Http\Middleware\Authorize::class,
    'guest' => \MyNamespace\Http\Middleware\RedirectIfAuthenticated::class,
    'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class,
    //'timeout' => \MyNamespace\Http\Middleware\SessionTimeout::class,
    'role' => \Zizaco\Entrust\Middleware\EntrustRole::class,
    'permission' => \Zizaco\Entrust\Middleware\EntrustPermission::class,
    'ability' => \Zizaco\Entrust\Middleware\EntrustAbility::class,
];

}

Routes.php

Route::get(’/’, function () {
return redirect(’/login’);
});

Route::get(’/clear-cache’, function() {
Artisan::call(‘cache:clear’);
Artisan::call(‘view:clear’);
});

Route::get(’/reminder’, function(){
Artisan::call(‘email:reminder’);
});

Route::get(’/temp’, [‘uses’=>‘ClientController@temp’]);

Route::post( ‘/password-reset’, [ ‘as’ => ‘password-reset’, ‘uses’ => ‘UserController@passwordReset’ ] );

Route::group([‘middleware’ => [‘web’,‘timeout’]], function () {
Route::auth();
Route::get( ‘/dashboard/{activeTab}’, [ ‘as’ => ‘dashboard’, ‘uses’ => ‘AdminController@dashboard’ ] );
Route::get(’/datatables’, [‘as’=>‘datatables’, ‘uses’=>‘AdminController@datatables’]);
Route::post(’/dt-clients’, [‘as’=>‘dt-clients’, ‘uses’=>‘AdminController@dtClients’]);

//AJAX request
Route::post('admin/admin-client-list', ['as'=>'admin-client-list', 'uses'=>'ClientController@adminClientList']);
Route::post('admin/agent-client-list', ['as'=>'agent-client-list', 'uses'=>'ClientController@agentClientList']);

/* CLIENT ROUTES */
Route::get( '/create-client', [ 'as' => 'create-client', 'uses' => 'ClientController@create' ] );
Route::get( '/client-copy/{clientId}', [ 'as' => 'client-copy', 'uses' => 'ClientController@clientCopy' ] );
Route::get( '/client/edit/{clientId}', [ 'as' => 'client-edit', 'uses' => 'ClientController@edit' ] );
Route::post( '/client/store', [ 'as' => 'client-save', 'uses' => 'ClientController@store' ] );
Route::post( '/client/store-copy', [ 'as' => 'client-save-copy', 'uses' => 'ClientController@storeCopy' ] );
Route::patch( '/client/update/{clientId}', [ 'as' => 'client-update', 'uses' => 'ClientController@update' ] );
Route::get( '/client/destroy/{clientId}/{location}', [ 'as' => 'client-delete', 'uses' => 'ClientController@destroy' ] );
Route::post( '/client/docs/{clientId}', [ 'as' => 'client-docs', 'uses' => 'ClientController@uploadDocs' ] );
Route::get( '/client/download/{fileId}', [ 'as' => 'client-file-download', 'uses' => 'ClientController@downloadFile' ] );
Route::post( '/client/delete-file', [ 'as' => 'client-file-delete', 'uses' => 'ClientController@deleteFile' ] );
Route::post( '/client/update-status', [ 'as' => 'update-status', 'uses' => 'ClientController@updateStatus' ] );
Route::get( '/client/show/{clientId}/{location}', [ 'as' => 'client-show', 'uses' => 'ClientController@show' ] );
Route::get( '/client/finalize/{clientId}', [ 'as' => 'client-finalize', 'uses' => 'ClientController@finalize' ] );

/* AGENT ROUTES */
Route::get( '/agents', [ 'as' => 'agent-list', 'uses' => 'UserController@index' ] );
Route::get( '/agent/show/{agentId}', [ 'as' => 'agent-show', 'uses' => 'UserController@show' ] );
Route::get( '/create-agent', [ 'as' => 'create-agent', 'uses' => 'UserController@create' ] );
Route::post( '/agent/store', [ 'as' => 'agent-save', 'uses' => 'UserController@store' ] );
Route::get( '/agent/edit/{userId}', [ 'as' => 'agent-edit', 'uses' => 'UserController@edit' ] );
Route::patch( '/agent/update/{userId}', [ 'as' => 'agent-update', 'uses' => 'UserController@update' ] );
Route::delete( '/agent/destroy/{userId}', [ 'as' => 'agent-delete', 'uses' => 'UserController@destroy' ] );
Route::post( '/agent/status-update', [ 'as' => 'status-update', 'uses' => 'UserController@statusUpdate' ] );
Route::post( '/agent/docs/{agentDetailId}', [ 'as' => 'agent-docs', 'uses' => 'UserController@uploadDocs' ] );
Route::get( '/agent/download/{fileId}', [ 'as' => 'agent-file-download', 'uses' => 'UserController@downloadFile' ] );
Route::post( '/agent/delete-file', [ 'as' => 'agent-file-delete', 'uses' => 'UserController@deleteFile' ] );
Route::get( '/agent/invoice/{agentId}', [ 'as' => 'agent-invoice', 'uses' => 'UserController@invoice' ] );

/* COMMISSION */
Route::post( '/admin/add-commissions', [ 'as' => 'add-commissions', 'uses' => 'CommissionController@addCommissions' ] );
Route::post( '/admin/commissions', [ 'as' => 'admin-commissions', 'uses' => 'CommissionController@dtAdminCommissions' ] );
Route::post( '/agent/commissions', [ 'as' => 'agent-commissions', 'uses' => 'CommissionController@dtAgentCommissions' ] );
Route::get( '/commission/destroy/{commissionId}/{location}', [ 'as' => 'commission-delete', 'uses' => 'CommissionController@destroy' ] );



//Search Routes
Route::post('/search/clients', ['as'=>'search-clients', 'uses'=>'ClientController@searchClients']);
Route::post('/search2/clients', ['as'=>'search-clients2', 'uses'=>'ClientController@searchClients2']);

//Roles & Permissions
Route::get( '/rolesnpermissions', [ 'as' => 'roles-permissions', 'uses' => 'RolePermissionController@index' ] );
Route::post( '/role/create', [ 'as' => 'role-create', 'uses' => 'RolePermissionController@createRole' ] );
Route::post( '/permission-update', [ 'as' => 'permission-update', 'uses' => 'RolePermissionController@permissionUpdate' ] );

//Internal Messages
Route::get( '/messages', [ 'as' => 'message-list', 'uses' => 'MessageController@index' ] );
Route::get( '/messages/{agentId}', [ 'as' => 'message-agent', 'uses' => 'MessageController@agentMessages' ] );
Route::post( '/manage-message', [ 'as' => 'message-manage', 'uses' => 'MessageController@manageMessage' ] );
Route::post( '/message-docs', [ 'as' => 'message-docs', 'uses' => 'MessageController@messageDocs' ] );
Route::get( '/message/download/{fileId}', [ 'as' => 'message-file-download', 'uses' => 'MessageController@downloadFile' ] );

});
[/php]

Sponsor our Newsletter | Privacy Policy | Terms of Service