requireRecord($request->getStation(), $id); $logPathPortion = 'webhook_test_' . $id; if (!str_contains($path, $logPathPortion)) { return $response ->withStatus(403) ->withJson(new Entity\Api\Error(403, 'Invalid log path.')); } $tempPath = File::validateTempPath($path); return $this->streamLogToResponse( $request, $response, $tempPath ); } }