mirror of
https://github.com/tiennm99/coolify.git
synced 2026-08-20 10:23:30 +00:00
fix(api): normalize log endpoint query handling
Clamp log line counts, parse timestamp flags consistently, and filter service subcontainers by Coolify labels. Document log endpoint timestamp parameters and database/service log routes in OpenAPI.
This commit is contained in:
@@ -2087,8 +2087,8 @@ class ApplicationsController extends Controller
|
||||
], 400);
|
||||
}
|
||||
|
||||
$lines = $request->query->get('lines', 100);
|
||||
$showTimestamps = $request->query->get('show_timestamps', false);
|
||||
$lines = normalizeLogLines($request->query('lines'));
|
||||
$showTimestamps = parseLogTimestampFlag($request->query('show_timestamps'));
|
||||
$logs = getContainerLogs($application->destination->server, $container['ID'], $lines, $showTimestamps);
|
||||
|
||||
return response()->json([
|
||||
|
||||
Reference in New Issue
Block a user