mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
* Keeps the dashboard sessions from expiring. Route dashboard ajax calls through Laravel. Boots minimal cookies and sessions. Does not fix other pages for now, real fix is to fully port. * Check Laravel auth for the legacy calls. Display Laravel errors in the dashboard. legacy auth checks are mostly extraneous now.
35 lines
678 B
PHP
35 lines
678 B
PHP
<?php
|
|
|
|
namespace App\Http\Controllers;
|
|
|
|
use App\Checks;
|
|
|
|
class LegacyController extends Controller
|
|
{
|
|
public function index($path = '')
|
|
{
|
|
Checks::postAuth();
|
|
|
|
ob_start();
|
|
include base_path('html/legacy_index.php');
|
|
$html = ob_get_clean();
|
|
|
|
return response($html);
|
|
}
|
|
|
|
public function api($path = '')
|
|
{
|
|
include base_path('html/legacy_api_v0.php');
|
|
}
|
|
|
|
public function dash()
|
|
{
|
|
ob_start();
|
|
include base_path('html/legacy/ajax_dash.php');
|
|
$output = ob_get_contents();
|
|
ob_end_clean();
|
|
|
|
return response($output, 200, ['Content-Type' => 'application/json']);
|
|
}
|
|
}
|