mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-24 02:14:21 -04:00
Add server timing for previews
This commit is contained in:
parent
3f610d68eb
commit
23a88f5a99
@ -177,6 +177,8 @@ class PreviewController extends BaseController
|
||||
return response()->json(['message' => 'This server cannot handle this request.'], 400);
|
||||
}
|
||||
|
||||
$start = microtime(true);
|
||||
|
||||
/** @var \App\Models\User $user */
|
||||
$user = auth()->user();
|
||||
|
||||
@ -322,6 +324,8 @@ class PreviewController extends BaseController
|
||||
|
||||
$response = Response::make($file_path, 200);
|
||||
$response->header('Content-Type', 'application/pdf');
|
||||
$response->header('Server-Timing', microtime(true)-$start);
|
||||
|
||||
|
||||
return $response;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user