path()), $request->except(['username', 'password'])); if (\Auth::check()) { // only allow debug for logged in users Debug::set(! empty($vars['debug'])); } // TODO, import graph.inc.php code and call Rrd::graph() directly chdir(base_path()); ob_start(); include base_path('includes/html/graphs/graph.inc.php'); $output = ob_get_clean(); ob_end_clean(); $headers = []; if (! Debug::isEnabled()) { $headers['Content-type'] = (Config::get('webui.graph_type') == 'svg' ? 'image/svg+xml' : 'image/png'); } return response($output, 200, $headers); } }