server['path_info']; if (in_array($pathInfo, self::STREAM_URL)) { $response->header('Content-Type', 'text/event-stream'); $response->header('Access-Control-Allow-Origin', '*'); $response->header('Access-Control-Allow-Methods', 'GET'); $response->header('Cache-Control', 'no-cache'); $response->header('Connection', 'keep-alive'); } parent::onRequest($request, $response); } }